View Single Post
Old 06-24-09, 08:04 AM   #3
Registered User
Join Date: Jun 2009
Posts: 2
Default Re: Fairly Dumb C++ Question.

Thanks I knew it was something simple. Can't actually use the loop cause its gonna but stuff like torch.txt and wall.txt but it made a simple example. Thank you again.


Ok, I have a follow up question. How do I reference it? Assume that I want the array called locationArray. I want to use a new line for each entry of the array for readiability and ability to change it later on. Would this work?

CString locationArray[4]
locationArray[0] = "example0.txt" ;
locationArray[1] = "example1.txt" ;
locationArray[2] = "example2.txt" ;
locationArray[3] = "example3.txt" ;

would that be correct? assuming so would I then do.

string storeVariable = locationArray[2] ;
cout << storeVariable ;

Thanks again for any help. I am very new to arrays.
AustinYQM is offline   Reply With Quote