I am getting an ofstream error in C++, here is my code
int main () {
  ofstream myfile;
  myfile.open ("example.txt");
  myfile << "Writing this to a file.\n";
  myfile.close();
  return 0;
}
error from Dev-C++ 10
C:\devp\main.cpp aggregate `std::ofstream OutStream' has incomplete type and cannot be defined
Thanks in advance
 
     
     
     
     
     
     
    