This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
static array of strings?
- From: "Sean Draine" <seandr at millisecond dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Thu, 21 May 2009 23:38:23 -0700
- Subject: static array of strings?
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