Hello, I am currently working on a simple program I can use to log user activity on a computer. Yes, I know, it's useless, but I can't think of anything better to use C++ to access text files for. Right now I can take user input and force it into a text file I call log.txt. What I would like to be able to do is take the previous log entry and add it back to the old one. Right now what the code does is it takes the file, opens it and then writes to the text file. It doesn't respect the fact that there used to be old log entries in there. If anyone can help me get the program to access the old entry and save it as a string, say oldLog and then add that to the current log along with the latest data. Here's my code so far. Thank you.
/*
Name: Computer Usage Log
Author: Dacoda Nelson
Date: 09/05/08 09:43
Description: A program for monitoring computer usage. The user inputs their
login information and reason for using. This is logged to a text
file and can be retrieved at a later time
*/