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 :)
Printable View
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 :)
Best is you use the string class:
dim1 and dim2 must both be constant positive integers.Code:#incude <string>
using namespace std;
string array[dim1][dim2];