typedef char[25] mystring; //?
ok, I'm working on this list class, and I'm supposed to convert it to run cstrings instead of ints, but I've hit trouble at the very beginning. I was using this: (so that I could change the datatype easily, har har)
Code:
typedef int ItemType;
so I changed it to this:
Code:
typedef char[25] StringType;
but when I try that I get weird errors:
Quote:
c:\program files\microsoft visual studio\myprojects\lab\datadefn.h(1) : warning C4091: 'typedef ' : ignored on left of 'char' when no variable is declared
c:\program files\microsoft visual studio\myprojects\lab\datadefn.h(1) : error C2143: syntax error : missing ';' before '['
c:\program files\microsoft visual studio\myprojects\lab\datadefn.h(1) : error C2143: syntax error : missing ';' before '['
It worked fine the other way, does anybody know what's going on?