I was thinking about this, and I decided to ask...
Is it acceptable in the C++ world to make an array out of a string object?
Example:
[Code=cpp]
std::string str[50];
[/Code]
Now, before the answers start flowing, let me state: I am NOT planning on doing this.
I recently learned how to use vectors, so I would use a string vector before I would do the above.
I know it's possible to do ( I've done it ), but I've been wondering if it was "ok" do this.
It's not that important, I just thought, maybe someone out there uses this in their programs.
Thanks for your time!
-Soneji
Is it acceptable in the C++ world to make an array out of a string object?
Example:
[Code=cpp]
std::string str[50];
[/Code]
Now, before the answers start flowing, let me state: I am NOT planning on doing this.
I recently learned how to use vectors, so I would use a string vector before I would do the above.
I know it's possible to do ( I've done it ), but I've been wondering if it was "ok" do this.
It's not that important, I just thought, maybe someone out there uses this in their programs.
Thanks for your time!
-Soneji
Comment