Changed the code to the following
tried many different ways to initalize the CString all of which are okay with the Constructor definitions of CString.
struct print
{
int x; //row
int y; //col
int fid;
CString data;
char *format;
};
CString gSin ;
CString CSZ("CityStZip");
CString temp;
// struct print form [4];
struct print form [] =
{
{ 30, 40, 1,data("test"), "N/A" },
{ 30, 42, 1,temp("TEST") , "N/A" },
{ 30, 44, 1,CString("data"), "N/A" },
{ 30, 50, 1,temp, "N/A" },
{ 30, 50, 1,CSZ, "N/A" },
};
I'm getting the following compiler errors:
error C2440: 'initializing' : cannot convert from 'const int' to 'struct print'
No constructor could take the source type, or constructor overload resolution was ambiguous
Pretty sure it's talking about the CString




Reply With Quote