Iostream

This is a discussion on Iostream within the Game Programming forums, part of the General Programming Boards category; Hi, there Can anyone help me with the following problem: How can I get my program to do the whole ...

  1. #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

  2. #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");

  3. #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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Drieving from iostream
    By Thantos in forum C++ Programming
    Replies: 8
    Last Post: 06-23-2004, 05:57 PM
  2. iostream & hex?
    By dmlx90 in forum C++ Programming
    Replies: 0
    Last Post: 05-23-2002, 12:51 AM
  3. DJGPP Doesn't include IOSTREAM!!!!!!!!!!!
    By Frenchfry164 in forum Game Programming
    Replies: 12
    Last Post: 10-27-2001, 01:27 PM
  4. << in iostream
    By badman in forum C++ Programming
    Replies: 8
    Last Post: 10-18-2001, 11:19 PM
  5. Is there a C iostream?
    By Khisanth in forum C Programming
    Replies: 1
    Last Post: 09-05-2001, 01:34 AM

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