- I have written a patch to write to a file and its working
//To write a file from this location std::ofstream myfile; myfile.open("warn_sen.txt"); myfile << "IT HITS HERE = " "\n"; myfile.close();
- But read operation is failing, stating that the conversion is not supported.
//To read a file from this location std::ifstream evadefile; evadefile.open("evade_sen.txt"); string flag_01 = evadefile; evadefile.close();
ERROR - E0312 no suitable user-defined conversion from "std::ifstream" to "std::string" exists
Please assist me with the same, thank you so much.