|
-
April 9th, 2013, 06:10 AM
#9
Re: Can't intialize C++ Struct with CString in it??
 Originally Posted by ADSOFT
Compiler doesn't specifically state which var in the struct is the problem, but it seems to be the CString, tried different ways to intialize it, all of which are defined in the CString constructor definitions get same compiler error for each structure member.
Do you understand what the lines really instruct compiler to do?
Code:
{ 30, 40, 1,data("test"), "N/A" },
{ 30, 42, 1,temp("TEST") , "N/A" },
This data("test") must be either explicit calling constructor data: ata(char*), or calling function int data(char*) defined somewhere in the scope. The same thing happens to temp("TEST"). This is definitely not what you intended to do.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|