First of all, you have the typedefs the wrong way around. The old type comes first,
typedef foo int;
typedef bar int;
Secondly, in C(++) typedef creates an alias, not a new type. So both foo and bar would be ''exactly the same'' as integers, and the compiler will not report an error.
View all comments
Show parent comment
7
u/twanvl Jul 23 '08
First of all, you have the
typedefs the wrong way around. The old type comes first,Secondly, in C(++)
typedefcreates an alias, not a new type. So bothfooandbarwould be ''exactly the same'' as integers, and the compiler will not report an error.