I'm trying to convert a char** to a const char**, but my compiler is giving me grief. Is this conversion possible??
I have 2 methods, like this:
const char** Console::getConsoleOutput() {
return this->prevInputs_;
}
const char* Console::getCurrentInput() {
return this->curInput_;
}
prevInputs_ is a char** (i.e. array of char*'s) and curInput_ is a char*.
The second method, getCurrentInput(), compiles fine. However, the first method, getConsoleOutput() gives me the error:
error: invalid conversion from ‘char**’ to ‘const char**’
Is there some way this can be done? I basically don't want any other objects changing the prevInputs_ data.
Thanks guys! I appreciate any help you can offer.
Jarrett