If i try to execute this code:
Code:
#define _UNICODE
#include <tchar.h>
#include <stdlib.h>
int main() {
TCHAR c[]=_TEXT("something");
system("PAUSE");
return 0;
}
I get the following compile errors (i am using Dev-c++4):
Code:
In file included from c:\docume~1\deviance\desktop\x\untitl~2.c:2:
C:\PROGRA~1\DEVC__~1\Include\tchar.h:57: parse error before `TCHAR'
C:\PROGRA~1\DEVC__~1\Include\tchar.h:57: warning: data definition has no type or storage class
c:\docume~1\deviance\desktop\x\untitl~2.c: In function `main':
c:\docume~1\deviance\desktop\x\untitl~2.c:7: `TCHAR' undeclared (first use in this function)
c:\docume~1\deviance\desktop\x\untitl~2.c:7: (Each undeclared identifier is reported only once
c:\docume~1\deviance\desktop\x\untitl~2.c:7: for each function it appears in.)
c:\docume~1\deviance\desktop\x\untitl~2.c:7: parse error before `c'
What am i missing?
If i add:
Code:
wprintf(L"This is working: %lc",123);
i get further errors.
Code:
wchar_t mystring[] = L"flipcode";
doesn't work either.
Can u tell me what i'm doing wrong. And perhaps give a a working sample o code so i can get the idea. Thank you.