Hello, i have a litlle problem. Here compiler gcc says "error ... expected constructor, destuctor or type conversion before += ...".
Why is that? Maybe because it runs out of a function?
You can't have code that runs outside of a function unless it is constructing a global variable.
1 2
std::string output_file=EXODOS; // this works because you're constructing output_file
output_file += "jjjjj"; // this fails because you're not constructing anything (output_file is already constructed)
string name = string("John") + " K. "; // all done when constructing the object
// or this:
string name = "John"" K. ";
// or this:
string name = "John K. ";
Executable code must be in a function. You must call it. The only things that can be outside of functions are declarations and the like.