I need to make a class that has an array as a data member. However I would like to make it so that the user can choose the size of the array when an object of that class is created. This doesn't work:
class CharacterSequence {
private:
  static int size;
  char sequence[size];
public:
  CharacterSequence(int s) {
    size = s;
  }
};
How would I do this?
 
     
     
     
    