hi everybody out there i need help from u in file handling
I’m using Ubuntu as my operating system
now my c++ code has a line remove("/home/manish.yadav/Desktop/ram.txt");
last time i ran this command in C code it remove my operating system
now I’m not sure to use it or not ?
can anyone tell me proper syntax of this command so that i can use it in my code ?
is there any other way to remove files in c++ by using programs? how to do this?
how delete file using c++ program ?
Take a look into the reference page for std::remove on how to use it to remove files.
Concerning your OS, std::remove doesn’t randomly kill OSs. Last time I tried it, the function worked as expected.