Adding character arrays to strings.
Hi, I'm writing a simple program to encrypt files ...and I want it to give it's output as enc_filename, or dec_filename when encrypting or decrypting, respectively. I get an error message:
scrypt2.cpp:90: error: invalid operands of types ‘const char ’ and ‘char*’ to binary ‘operator+’
for the line of code:
any idea how I can get this to work?
std::ofstream out("dec_" + argv);
edit:: i also get that error for another line, where the only difference is that it has "enc_" instead of "dec_".....