Where are the text files
Hello, I am using ROS to control the Crazyflie and I need to log the distance, velocity data to do analysis. I use this code:
std::ofstream myfile1;
myfile1.open("/home/Desktop/time.txt", std::ios_base::app | std::ios_base::out);
myfile1 << "abc \n";
myfile1.close();
std::ofstream myfile2;
myfile2.open("/home/Desktop/position.txt", std::ios_base::app | std::ios_base::out);
myfile2 << "%f %f %f \n"<<x,y,z;
myfile2.close();
It is only part of my code. However, after I use "Ctrl+C" to stop the code, I cannot find the two text files on my desktop. I am pretty sure that the code has gone through this part, then I use "Ctrl+C"
Does anyone know why is it? Thanks