Ok, I know these conversion questions have been asked before, but I can not for the life of me figure out how to do something that should, in theory, be conceptually simple. Here’s my deal :
I have a char * that grabs values from strtok (). Given that the actual pointer itself is going to change, it can’t be a const.
I later in my code attempt to populate a Combobox value with this pointer.
No matter what ridiculous hoops I jump through to convert this into a form that Juce will be happy with, the thing will just flat-out not populate the Combobox. Wrapping with _T(), in-between conversion to std::string, strcpy’ing into a static char * casted as a const char * all have failed with flying colors.
I figure this sort of operation is routine and surely someone knows how to do this, but if I had any hair, I would’ve pulled it all out on this one by now.
char * Current_Token = NULL; Current_Token = strtok ( (char *) readBuffer.c_str (), ",\n\0"); . . . cboThe_ComboBox->addItem (Current_Token, Index);
No variation or conversion of Current_Token has been successful. There’s got to be something simple I am just missing on this. I hope someone can point me in the right direction. Working code is more than appreciated.