A
Alex
Hello people,
I am getting errors from VS2003 when working with typedef'ed types.
For example, assume that I have a type T, defined in a 3rd party include file based on some condition
#if (condition)
typedef char T;
#else
typedef short T;
#endif
Let's assume, for the sake of discussion that the condition is true. So we get:
typedef char T;
Now, I want to use the unsigned form of T in my code:
unsigned T t;
This gives me the following errors:
error C2628: 'T' followed by 'unsigned' is illegal (did you forget a ';'?)
When instead I try:
T unsigned t;
I get:
error C2146: syntax error : missing ';' before identifier 't'
error C2377: 'T' : redefinition; typedef cannot be overloaded with any other symbol. see declaration of 'T'
error C2065: 't' : undeclared identifier
What am I doing wrong?
Best wishes,
Alex.
I am getting errors from VS2003 when working with typedef'ed types.
For example, assume that I have a type T, defined in a 3rd party include file based on some condition
#if (condition)
typedef char T;
#else
typedef short T;
#endif
Let's assume, for the sake of discussion that the condition is true. So we get:
typedef char T;
Now, I want to use the unsigned form of T in my code:
unsigned T t;
This gives me the following errors:
error C2628: 'T' followed by 'unsigned' is illegal (did you forget a ';'?)
When instead I try:
T unsigned t;
I get:
error C2146: syntax error : missing ';' before identifier 't'
error C2377: 'T' : redefinition; typedef cannot be overloaded with any other symbol. see declaration of 'T'
error C2065: 't' : undeclared identifier
What am I doing wrong?
Best wishes,
Alex.