Hi
I have a class, with a private data member char *a. In the constructor, how can I allocate 20 bytes for char *a, and then set it to a parameter?
ThanksCode:class A { private: char *a; }; A::A(char *b) { //would like to allocate 20 bytes, and set b = a; } //desctructor A::~A(void) { delete[] a; }