static array of strings?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm porting a Windows app written in VC++ to the Mac and am getting a
compile error that I can't figure out. The relevant code is as follows:

//////////////////////////////////////////////
#define _T(x)      L ## x

const int NUM_VALIGNMENTS = 3;

const LPCTSTR VAlignments[NUM_VALIGNMENTS] =
{
	_T("bottom"),
	_T("center"),
	_T("top")
};
//////////////////////////////////////////////

The code generates the following compile errors at each item in the array:
- Syntax error
- expected unqualified-id before ',' token
- expected '}' before ';' token

Is there a specific issue with the syntax, the macro, or are static arrays
of strings simply not supported by gcc?

Thanks,
Sean


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux