o_wild Messages: 28 Registered: December 2008 Location: Urmqi
Promising Member
The following code is excerpt of an opensource software, but there is error when compiled.
fprintf(ofp,"%s\n",mes1); // mes1 is of type String
The error message is
cannot pass objects of non-trivially-copyable type 'class Upp::String' through '...'
The software can be compiled with both mingw and MSVC as the developer says. Since I have problem using MSVC due to C2001 error(new line in constant), I choose MingGW 4.5.0.
Is their any substitute for 'fprintf'? by the way, i tested 'printf' and found the same problem.