writing in a text file

edited December 2016 in C++
Hi, 

After processing the datas, I want to save the result in a text file.
this is the code  But it didn't do anything, it didnt even create a file and write the  "metawear rpro" .how can I  figure it out ? thanks.

#include <iostream>
   #include <fstream>
   #include <string>
   using namespace std;

  
      std::ofstream o("/Users/sample/Desktop/save.txt");

      o << "metawear rpro" << std::endl;

  
   

Comments

This discussion has been closed.