cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
add to text file without wiping out what
add to text file without wiping out what's there
Jan 21, 2011 at 5:07am UTC
tomasjae
(1)
Hi all, I'm making a little journal program that simply takes a date and entry and stores it in a text file. Each time I make an entry it copies over the last one. How do I concatentate to the text that's already there? Thanks for any help.
Jan 21, 2011 at 5:20am UTC
wolfgang
(381)
std::ofstream file(
"myfile.txt"
, std::ios::app);
// I believe
Jan 21, 2011 at 6:02am UTC
rocketboy9000
(562)
FILE*output=fopen(
"output.txt"
,
"a"
);
Topic archived. No new replies allowed.