Does it compile at all???

nodeptr[10]; nodeptr is just a pointer to a type struct node..who will allocate memory??
for(i=0;i<10;i++)
a[i]=NULL; ?? who has defined a??

The right mechanism would be...

nodeptr=(node1) malloc(sizeof(node1)*10);
(nodeptr[0]->s1).counter=0;







ss dos <[EMAIL PROTECTED]>

11/09/2004 04:18 PM

Please respond to
[EMAIL PROTECTED]

To
[EMAIL PROTECTED]
cc
Subject
[c-prog] what thes error ???!!!





i wrote this code .....
 
typedef struct {int data ; int counter;}rec;
typedef struct node {rec s1;struct node *next ;}node1;
node1 *nodeptr;
 
 
int main()
{
nodeptr[10];
for(i=0;i<10;i++)
a[i]=NULL;
 
 
a[0]->s1.counter=0;  // here the  error and the error is
dereferencing pointer to incomplete type??? what does it mean ???
 

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor

ADVERTISEMENT




Yahoo! Groups Links ForwardSourceID:NT000072CE    
DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services Limited. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services limited on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail.
Thank you.


To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=839747566


Yahoo! Groups Links

Reply via email to