Hi Everyone i am a newbie for c++, i just wanted to ask a question about fstream.
basically at the moment , I have a program that generates a 4 digit pin every 15 seconds . now that 4 digit pin generated are written inside a .txt file . the problem is the .txt file contains all the generated pin. meaning my file look like this at the moment
qwer
asdf
zxcv
tyui ---- represents the most recent generated pin
but i only wanted the most recent generated pin to be inside the .txt file . so i wanted to delete and overwrite those 15 seconds old pins . is that possible ??
I need your advice. Thank you