can't compile no combination I write.....
Code:
struct my_struct { int var1; char txt[50]; my_struct(){ var1=0; txt = ?????????? }; };
I'd want to initialize txt to zero characters (empty), or 50 blank spaces.
I need help ......
Thanks
Printable View
can't compile no combination I write.....
Code:
struct my_struct { int var1; char txt[50]; my_struct(){ var1=0; txt = ?????????? }; };
I'd want to initialize txt to zero characters (empty), or 50 blank spaces.
I need help ......
Thanks
Code:
#define TXT_SIZE 50 struct my_struct { int var1; char txt[TXT_SIZE]; my_struct(){ var1=0; memset(txt,0,sizeof(char)*TXT_SIZE); } };