How do I initialise a char array in a class definition?
I know this code is horribly wrong but i dont know how to approach this.Code:class charArray { public: charArray() { charArray[30] = {0}; } void setSampleArray(char[] x){ sampleArray = x;} char getSampleArray() { return sampleArray; } protected: char sampleArray[30]; };