cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
char and string (what is exactly the dif
char and string (what is exactly the difference)
Jul 16, 2010 at 1:30pm UTC
Blessman11
(370)
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
Jul 16, 2010 at 1:34pm UTC
Skillless
(227)
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
Jul 16, 2010 at 1:34pm UTC
Topic archived. No new replies allowed.