|
-
April 9th, 2013, 06:13 AM
#14
Re: Can't intialize C++ Struct with CString in it??
I wrote this function which worked in my Formview App(had to do it another way):
struct print
{
int x; //row
int y; //col
int fid;
CString data;
char *format;
};
CString gSin = "gSin";
CString CSZ("CityStZip");
char str[120];
CString temp = "Temp";
struct print form [4];
void set (int i, int x, int y, CString Data){
form[i].x = x;
form[i].y = y;
form[i].data = Data;
}
void init_struct (void){
set(0,30,40, CSZ);
set(1,30,42, gSin);
set(2,30,44, temp);
set(3,30,46, CSZ);
}
Rate this post if it helped you.
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
|