Anyone know if I am doing the right thing here? I mean, it is pretty straightforward string manipulation?
class cConsole { public: // Constructor - takes all the information you need for the buffer cConsole(int Linelength, int Buffersize) {buffersize = Buffersize; linelength = Linelength; sprintf(prompt,"> "); } // Destructor - cleans up behind itself ~cConsole() { } // Class functions char* GetBuffer(); void NewLine() { } void AddChar(int Char) { char input[1]; sprintf(input,"%c",__toascii(Char)); strcat(buffer,input); } void AddChar(char Char) { } void Draw(); void SetPrompt(char* Prompt) { sprintf(prompt,"%s",Prompt); } void ToggleActive() { active = !active; } bool Status() { return (active); } private: int buffersize; int linelength; int charcount; char buffer[1]; char prompt[1]; bool active; };