Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CStringArray

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi I am Visual C++ beginner and I want to know if I can create with the CStringArray Object an Array with more dimensions than 1.

I am sorry for my bad English, but I hope you understand it bye cmerkl.
 
Ya, you can do

const int SIZE_A = 25;
const int SIZE_B = 50;

CStringList myList[SIZE_A][SIZE_B];

or something like that.

Matt
 
Assume I understand your question, sure you can do that. a sample code is like this:

CStringArray aStr[5];

aStr[0].Add("test");
aStr[1].Add("test1");
 
No the CStringArray class doesn't support multi-dimensional arrays. You can however create a CPtrArray or CObArray of CStringArrays, and this would get you the equivalent of a multi-dimensional CStringArray.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top