Question about double pointers assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all:

I write a program like below:

 

#include<stdio.h>

#include<stdlib.h>

int    exterint[5][5];

int    exterint1[5];

int main(void){

    int index0, index1;

    int **temp1;

    int *temp2;

    temp2=exterint1; //*****

    temp1 = exterint;  //xxxxxxxxx

…..

…..}

 

The compiler will warn me that at line marked as xxxxx is “assignment from incompatible pointer type.”

But “******” doesn’t get any warning.

 

Is there any restriction about assigning multi-layer array or something about pointer I miss?

 

Appreciate your help,

cckuo


*****************  Novatek Email Confidentiality Notice *****************
The information contained in this electronic communication, and any electronic attachments, is confidential or legally privileged and may be subject to protection under the law. It is intended only for the named recipient above. If you have received this communication in error, or are not the named recipient, please immediately notify the sender via reply email and delete this communication from your computer system, and destroy all copies of this communication along with any attachments. Thank you for your cooperation.

Copyright Novatek 2006-2007 All Rights Reserved


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux