Hello,
I have a general question regarding how a C/C++ compiler will handle generating machine code with respect to a struct.
Lets compare the generated code for:
int Var1;
int Var2;
bool Var3;
cout << Var1 << endl;
vs.
struct MyStruct
{
int Var1;
int Var2;
bool Var3;
};
MyStruct my;
cout << my.Var1;
Will the compiler generate different machine code for those two blocks of code? I've been reading that it does not, but have never seen a clear-cut yes-or-no answer on it.
Also, typedef is only for internal purposes of the compiler and will not cause it to generate any machine code, correct?
Thank you!