Hey guys:
I just had a simple question... How do you initialize strings in C++ to empty? I thought you could say string=""; and that would do it...but it obviously doesnt work. I would appreciate any help i could get.
Shishir
Printable View
Hey guys:
I just had a simple question... How do you initialize strings in C++ to empty? I thought you could say string=""; and that would do it...but it obviously doesnt work. I would appreciate any help i could get.
Shishir
char string[10];
string[0] = '\0';
or
Code:string My_Name="\0";