char and string (what is exactly the difference)

whats the deference between characters and strings

I just defined a character as

1
2
char firstpresident;
firstpresident = 'Iwantpower';


its saying that the name of firstpresintent is too long.
//somebody explain the difference please(Im using VC++2010),what is the limit to the about of letters characters can have.

should I just use a string instead
char is one character, like char a = 'c', a string is either an array of characters or the string class

Arrays; http://cplusplus.com/doc/tutorial/arrays/
String; http://cplusplus.com/reference/string/
Last edited on
Topic archived. No new replies allowed.