I would like to do the following:
const char errorMsg [64] ( useApple ? "Error Msg Apple\n" : "Error Msg Bee\n" );
MyMethod ( errorMsg );
For a method with signature:
MyMethod(const char* errorMessageInput );
I have a method which takes a const char* and I would like to create a local variable before I send it in. I cannot allocate dynamic memory but I can use a larger array than necessary (in this case I made it 64). How would I get this code to compile?