Return to Website

C++ / VC++ / MFC Discussion Forum

Welcome to the forum. Now, you can use HTML in your posts too.

C++ / VC++ / MFC Discussion Forum
Start a New Topic 
Author
Comment
View Entire Thread
Re: data types understanding....

what about this code?
union a
{
struct b{
char c ;
};
ulong d;
};
union a x;
x.b.c ='n';
x.b.c = 'a';
x.b.c ='m';
x.b.c ='e';
char name[]="name"
for(int i=0; i < strlen(name);i++)
x.b.c = name ;
ulong u = x.d;