Hello, I'm currently implementing class using C++ string.
Now, as private members of this class I have:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class MyClass
{
private:
string key[];
string val[];
public:
MyClass(int s)
{
//here I want to allocate key and val string arrays to hold s number of
//elements
string key[s];
string val[s];
//How do I do it?
}
}