how to use the c++ to write the code :
case 1: how to write the code for update the record (string) from the text file.
can anyone show me some simple c++ code example.
case 2: how to write the code for delete the record (string) from the text file.
can anyone show me some simple c++ code example.
One approach is to read the entire file into a vector. Make whatever changes you like to the vector. Then save the contents of the vector back to the file.
If you need such thorough examples, then you really should be consulting your textbook, or look for an online tutorial. There is a tutorial on this site which covers the basics of C++ but doesn't get into the more advanced topics which you are asking about.