I am using visual studio 2008 express edition.
A normal win32 console C project with the code below:
int main(void)
{
struct _addr_info
{
char name[30];
char street[40];
char city[20];
char state[3];
unsigned long int zip;
} addr_info;
addr_info.zip = 12345;
return 0;
}
Generally for structures intellisense will list the members. Here it doesnt however it compiles fine and at debugging i checked the data also gets entered properly. Am i doing something wrong.
even this code has same prob.
int main(void)
{
struct
{
char name[30];
char street[40];
char city[20];
char state[3];
unsigned long int zip;
} addr_info;
addr_info.zip = 12345;
return 0;
}
This code below also doesn't work.
int main(void)
{
struct _addr_info
{
char name[30];
char street[40];
char city[20];
char state[3];
unsigned long int zip;
} ;
struct _addr_info addr_info;
addr_info.zip = 12345;
return 0;
}
The code below works fine and list the members of the structure.
struct _addr_info
{
char name[30];
char street[40];
char city[20];
char state[3];
unsigned long int zip;
} addr_info;
int main(void)
{
addr_info.zip = 12345;
return 0;
}
This one too.
struct _addr_info
{
char name[30];
char street[40];
char city[20];
char state[3];
unsigned long int zip;
} ;
int main(void)
{
struct _addr_info addr_info;
addr_info.zip = 12345;
return 0;
}