Expected Identifier before string const
C++ library for creating XLSX files for MS Excel 2007 and above.
Brought to you by:
oxod,
programmeralex
Hi all,
I am simply calling initializing CWorkbook as follows. error while compling.
CWorkbook book( _T("Incognito") );
error: expected identifier before string constant
CWorkbook book( _T("Incognito") );
^
/Xlsx/../tchar.h:177:16: note: in definition of macro '_T'
#define _T(x) x
^
error: expected ',' or '...' before string constant
CWorkbook book( _T("Incognito") );
^
please letme know why can't I initialize;
I am initializing
CWorkbook book( _T("Incognito") ); as an attribute of a class name TracingResultExporter; The above compilation error comes.
please suggest me. where I am doing mistake.
Hi,
If I understand you correctly, than the compiler has counted your class variable as a class function.
This is an invalid declaration of a class variable. Your code should be something like this:
Header file:
Cpp file:
If this does not work, show your minimum non-working code and write the name of your IDE.
Hi Alexandr, thank you so much. Done its working.
You're welcome :-)