fork download
  1. std::ofstream cf;
  2. cf.open("SocketCooler" + std::to_string(this->id) + ".txt");
  3.  
  4. if(cf.is_open())
  5. {
  6. cf << false << std::endl;
  7. cf.close();
  8. }
  9.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:6: error: 'ofstream' in namespace 'std' does not name a type
 std::ofstream cf;
      ^
prog.cpp:2:1: error: 'cf' does not name a type
 cf.open("SocketCooler" + std::to_string(this->id) + ".txt");
 ^
prog.cpp:4:1: error: expected unqualified-id before 'if'
 if(cf.is_open())   
 ^
stdout
Standard output is empty