mardi 29 janvier 2019

how to covert string array to char**

I want to send the values manually here

void processArgs(int argc, char** argv);

if I sending like this

char* cwd[] = {"./comDaemon", "--loggg=pluginFramework:debug"};

parser->processArgs(2, cwd);

compiler showing warning as

warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]

 char* cwd[] = {"./comDaemon", "--loggg=pluginFramework:debug"};

Aucun commentaire:

Enregistrer un commentaire