|
-
May 8th, 2010, 09:24 AM
#1
[RESOLVED] Array question
i want to create a 2D char array. my issue is that i dont know how many Rows i will need for the array...
how can i keep adding rows to the array?
-
May 8th, 2010, 09:31 AM
#2
Re: Array question
 Originally Posted by Cpp_Noob
i want to create a 2D char array. my issue is that i dont know how many Rows i will need for the array...
Dynamic arrays in C++ are taken care of by the std::vector class. If the char arrays are actually strings, then std::string is used.
Code:
#iinclude <vector>
#include <string>
std::vector<std::string> StringArray;
how can i keep adding rows to the array?
vector::push_back()
Regards,
Paul McKenzie
Last edited by Paul McKenzie; May 8th, 2010 at 09:55 AM.
-
May 8th, 2010, 09:37 AM
#3
Re: Array question
thank you
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
|