Wednesday, February 3, 2010

String s1 = 'a'; is an invalid initialization ( true or false) C++?

true





You will get an invalid conversion from char to const char* error.String s1 = 'a'; is an invalid initialization ( true or false) C++?
True - it would need to be:





string s1 = ';a';;

No comments:

Post a Comment