fstream to location
I'm sure I'm missing something obvious, but...
I can't seem to find this anywhere. Is there a way to use <fstream> to write to a specific location? Relative to its current location?
Is below what you want?
write to a specific location? |
fstream f1("/here/there/a.file");
f1 << "hello world";
Relative to its current location? |
fstream f2("../there/here/b.file");
f2 << "hello buddy";
Last edited on
That looks right!
I should really get to bed now, but I'll test it in the morning.
Thanks!
Topic archived. No new replies allowed.