Well, this is quiet obvious even the least follower of C struct can answer
it but the good part is why does compiler is design to do so..

Hope ppls do follow me in this activation rec..

 yy *q
 struct yy (defined in somewhere)
 x..

 Guys above notation is in stack so srry again for no Whiteboard..

and yy is now not to be found as the struct is defined inside of xx whose
scope is lost as soon as we come out of this activation stack but look the
joke of this code.

there is redefinition of yy inside xx and xx have no idea about the lost
activation rec regarding yy.. so xx (lol) is lost in some inconsistency and
ask compiler to answer it..

Compiler like a BAD tech lead say Dude.. M gonna throw u out and keeps
posted with this nasty error..

Make Sense.

Regards
 Prem



On Wed, Jul 27, 2011 at 9:52 PM, Aman Goyal <aman.goya...@gmail.com> wrote:

> #include‹stdio.h›
> main()
> {
> struct xx
> {
> int x;
> struct yy
> {
> char s;
>       struct xx *p;
> };
> struct yy *q;
> };
> }
>
> ouput: compiler error.
>
> Any logical reasons?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to