can varibles be two words? e.i.
char two words[] = "2 words";
can varibles be two words? e.i.
char two words[] = "2 words";
yup. but not like that...
use strings...
first include a string header string.h or cstring.h
Code:string 2_words; . . . 2_words = " Look im a variable that holds crap! ";
an array like your example can only hold one thing at a time...
like
Code:char 2words[] = { '2', ' ', 'w', 'o', 'r', 'd', 's' }
Last edited by Vicious; 06-15-2002 at 12:23 PM.
What is C++?
>but not like that...
Nor like your example. Identifiers cannot start with a number.
The closest you can get to the original question is:
char two_words[] = "2 words";
-Prelude
My best code is written with the delete key.
[edit]
omg, im sooo sorry... i just now understood the question.
you meant can the actual variable have 2 words like
int two words... heh sorry.
[/edit]
Last edited by Vicious; 06-15-2002 at 12:39 PM.
What is C++?