[Message Deleted]
-
This post can get deleted - I hoped to take the replies with it.
modified on Wednesday, November 4, 2009 2:50 PM
nope... (I'm not familiar with PHP, but it is probably creating "dummy" associative arrays for each new variables)
This signature was proudly tested on animals.
-
This post can get deleted - I hoped to take the replies with it.
modified on Wednesday, November 4, 2009 2:50 PM
Why do you need to do such a thing in C++. You could always create dynamic arrays using a
vector
.std::vectorstd::string name;
for (unsigned i = 0; i < 10; ++i)
name.push_back("some value");You can access the vector elements like -
for (unsigned i = 0; i < 10; ++i)
cout << name[i].c_str();«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Why do you need to do such a thing in C++. You could always create dynamic arrays using a
vector
.std::vectorstd::string name;
for (unsigned i = 0; i < 10; ++i)
name.push_back("some value");You can access the vector elements like -
for (unsigned i = 0; i < 10; ++i)
cout << name[i].c_str();«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
Why do you need to do such a thing in C++. You could always create dynamic arrays using a
vector
.std::vectorstd::string name;
for (unsigned i = 0; i < 10; ++i)
name.push_back("some value");You can access the vector elements like -
for (unsigned i = 0; i < 10; ++i)
cout << name[i].c_str();«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)a map would be much better for this, IMO.