Reputation:
I'm using a class that accepts commands as strings. Example ...
string cmd = "start";
connection->execute(cmd);
The 'disconnect' command is any string starting with the character '-1'. I tried doing this ...
string cmd = "0";
cmd[0] = '-1';
connection->execute(cmd);
But that produced this error ...
warning: multi-character character constant [-Wmultichar]
... how do I create a string that starts with char '-1'?
Upvotes: 0
Views: 76