I guess you attempted to do this

#cat test.c
#include <unistd.h>
typedef struct {int data ; int counter;}rec;
typedef struct node {rec s1;struct node *next ;}node1;
typedef node1 *nodeptr;  /*nodeptr should be typedef'd
*/

int main()
{
int i;
nodeptr a[10];    /* a[] should be defined here */
for(i=0;i<10;i++)
    a[i]=NULL;
for(i=0;i<10;i++)
    a[i] = (nodeptr)malloc(sizeof(node1));
for(i=0;i<10;i++)
    a[0]->s1.counter=0;
}

--Chandan


--- ss dos <[EMAIL PROTECTED]> wrote:

> 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



           
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com




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=294855.5468653.6549235.3001176/D=groups/S=:HM/A=2376776/rand=625284592


Yahoo! Groups Links

Reply via email to