LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   typedef with pointers (https://www.linuxquestions.org/questions/programming-9/typedef-with-pointers-4175423697/)

SIG_SEGV 08-24-2012 01:17 AM

The second place where you used Person for declaration looks as follows under the effect of typedef........

Person
{
char name[11];
int age ;
};


looks like-------------->

struct Person {} {
char name[11];
int age ;
};

Coz, Person is of type 'struct Person' which is empty structure..........Try above syntax, YOU WILL DEFINETLY GET THE SAME ERROR AND CONCLUDE YOURSELF THE WORKING OF "TYPEDEF"


All times are GMT -5. The time now is 12:59 AM.