1 2 3 | char *string = ""; char *currentChar = "B"; strcat(string, currentChar); |
Y2hhciAqc3RyaW5nID0gIiI7CmNoYXIgKmN1cnJlbnRDaGFyID0gIkIiOwpzdHJjYXQoc3RyaW5nLCBjdXJyZW50Q2hhcik7
prog.cpp:1: warning: deprecated conversion from string constant to ‘char*’ prog.cpp:2: warning: deprecated conversion from string constant to ‘char*’ prog.cpp:3: error: expected constructor, destructor, or type conversion before ‘(’ token
-
result: Compilation error (maybe you wish to see an example for C++ 4.7.2)


