Is it possible for me to have atrrays of strings in C++?
For exaple:
String[0]="Hello";
String[1]="Goodbye";
String[2]="Catch ya up";
Thanks for any help,
Paul
Is it possible for me to have atrrays of strings in C++?
For exaple:
String[0]="Hello";
String[1]="Goodbye";
String[2]="Catch ya up";
Thanks for any help,
Paul
is that what you mean?Code:char *myarray[3]={"hello", "goodbye", //...
But isn't that a pointer?
Well anyway, using what u said, if I wanted the computer to print "Hello" would I write: cout << Myarray[0] ?
And what If i only wanted it to print say, the first letter of the Word "hello", how would I go about getting only the first character up?
Paul
Try this String[0][0].
Kuphryn
Yes, you can have pointers to strings and put tghem in an array.