|
-
Dec 14th, 2002, 05:09 PM
#1
Thread Starter
Fanatic Member
Strings in an Array
OK I am very newb to C++, but am pretty good with PHP. Anyway What I want to do is have a multidimentional array.
MyArray[0][0]="My string"
MyArray[0][1]="My string2"
MyArray[1][0]="The string"
etc.
How can I set this up in c++?
Thanks
-
Dec 14th, 2002, 08:36 PM
#2
Best is you use the string class:
Code:
#incude <string>
using namespace std;
string array[dim1][dim2];
dim1 and dim2 must both be constant positive integers.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|