Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, they’re not exactly equivalent.
In the first version
Foois a typedef for the namedstruct myStruct.In the second version,
Foois atypedeffor an unnamedstruct.Although both
Foocan be used in the same way in many instances there are important differences. In particular, the second version doesn’t allow the use of a forward declaration to declareFooand thestructit is atypedeffor whereas the first would.