Search:
Forum
General C++ Programming
using variables as ofstream save locatio
using variables as ofstream save locations
Sep 15, 2009 at 11:17pm UTC
twitch2197
(2)
Is it possible to have someone, say, input a value to a string variable "justastringvar" and later use it in an ofstream like
ofstream ofstring(justastringvar);?
Sep 15, 2009 at 11:37pm UTC
helios
(17607)
Yes.
1
2
3
std::string s;
//...
std::fstream(s.c_str());
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs