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 [5]’ and ‘char*’ to binary ‘operator+’
for the line of code:
Code:
std::ofstream out("dec_" + argv[1]);
any idea how I can get this to work?
thanks.
edit:: i also get that error for another line, where the only difference is that it has "enc_" instead of "dec_".....