You should post the actual code that you tried. In your first example, you should be getting a compile error, not a linker error, because the struct has no member named myMember.
Compile and link this program:
Code:struct nameOfStruct { int myMember1; short myMember2; }; int main() { nameOfStruct myInstance; myInstance.myMember1 = 444; return 0; }





Reply With Quote
