ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 1 | initial version |
ofstream MyExcelFile ("ADA_result.xlsx", ios::trunc);
is outside the function, which is bothering me. I'm wondering if there might be a problem with opening the file outside the function.
Wouldn't it work if I commented the code for MyExcelFile?
If commenting it works, then
ofstream MyExcelFile ("ADA_result.xlsx", ios::trunc);
to ofstream MyExcelFile;
.
Then, at the beginning of initialize, call
MyExcelFile.open("ADA_result.xlsx", ios::trunc);
at the beginning of initialize to open the file, and it will work while writing to MyExcelFile.