Could someone please tell me how to declare an array of strings...Sounds stupid but im stumped....!
thnx,
Wick
Could someone please tell me how to declare an array of strings...Sounds stupid but im stumped....!
thnx,
Wick
What kind of strings do you want? An array of character strings can be defined as a 2d array:
Code:char strings[10][20];
Or if you're going to use ANSI string:
std::string Strings[20];
Making error is human, but for messing things thoroughly it takes a computer
The STL string class is smarter than the character array because it can grow, but if you want it to also be smart due to the fact that you don't know how many strings you need than use containers:
Code:vector<string> strings; list<string> strings;