On Fri, Nov 3, 2017 at 3:07 PM, mahmood n via gcc-help <gcc-help@xxxxxxxxxxx> wrote: > ... > Part of the code for that error is > > std::stringstream cmd; > cmd << "a string”; > int result = system(cmd.str().c_str()); > if(result){ > std::cout << "Failed to execute: " << cmd << std::endl; > exit(1); > } > > I changed that cout line to cmd.str() and the error disappeared. However, I am not if I have to use cmd.str().c_str()? You may want to change it to: std::cout << "Failed to execute: " << cmd.str() << std::endl; It will print try to print embedded NULL's too in the case you have an one in your command. Jeff