C Board  

Go Back   C Board > General Programming Boards > Game Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 10-13-2001, 12:10 PM   #1
Registered User
 
Join Date: Aug 2001
Posts: 7
Unhappy Iostream

Hi, there

Can anyone help me with the following problem:

How can I get my program to do the whole 'ifstream and ofstream' but instead of it writting the file to the same directory as the actual program but to a specified directory, for example make a new file in "c:\games"

If anyone can help it would be great

Thanx

StaticMan
Staticman is offline   Reply With Quote
Old 10-13-2001, 01:05 PM   #2
Registered User
 
Join Date: Sep 2001
Posts: 412
You can specify the full pathname for a file. Just do something like this:

ofstream outStream("c:\\games\\myfile.txt");
The V. is offline   Reply With Quote
Old 10-16-2001, 03:48 PM   #3
Registered User
 
Join Date: Aug 2001
Posts: 7
Thumbs up Thanx for the help

Thanx, it's working now. I mean, thanx ALOT!!! You saved me.

Staticman
Staticman is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drieving from iostream Thantos C++ Programming 8 06-23-2004 04:57 PM
iostream & hex? dmlx90 C++ Programming 0 05-22-2002 11:51 PM
DJGPP Doesn't include IOSTREAM!!!!!!!!!!! Frenchfry164 Game Programming 12 10-27-2001 12:27 PM
<< in iostream badman C++ Programming 8 10-18-2001 10:19 PM
Is there a C iostream? Khisanth C Programming 1 09-05-2001 12:34 AM


All times are GMT -6. The time now is 10:16 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22