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
fstream
fstream
Apr 16, 2015 at 2:53pm UTC
sujitnag
(132)
I create a file through c++ program.
at the end of my program I have a condition check;
if true -> I want to save the file with new changes;
else-> discard the changes;(not the file)
there is any function to say save the file or cancel it?
I don't want to make a shadow file;
Last edited on
Apr 16, 2015 at 2:55pm UTC
Apr 16, 2015 at 2:56pm UTC
LB
(13399)
Save to a
std::string
or
std::ostringstream
and then when your condition is met, open the file and write to it.
Topic archived. No new replies allowed.