Iostream

This is a discussion on Iostream within the Game Programming forums, part of the General Programming Boards category; Hi, there Can anybody help me with the following problem: How can I make it so that when I make ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    7

    Unhappy Iostream

    Hi, there

    Can anybody help me with the following problem:

    How can I make it so that when I make a file with the whole 'ofstream' that is not written to the same directory as the actuall program for example, how would I make it write a file in "c:\games" or for that matter, any directory I want.

    If anybody can help I would be very thankful

    StaticMan


    Thanx

  2. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    6
    you can try this one:

    ofstream out("c:\games\filename.txt");

    I hope it helps.

  3. #3
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,803
    or you could do it the right way
    Code:
    ofstream out("c:\\games\\filename.txt");
    Woop?

  4. #4
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    ofstream? ewwww.

  5. #5
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    ?
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

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, 04:57 PM
  2. iostream & hex?
    By dmlx90 in forum C++ Programming
    Replies: 0
    Last Post: 05-22-2002, 11:51 PM
  3. DJGPP Doesn't include IOSTREAM!!!!!!!!!!!
    By Frenchfry164 in forum Game Programming
    Replies: 12
    Last Post: 10-27-2001, 12:27 PM
  4. << in iostream
    By badman in forum C++ Programming
    Replies: 8
    Last Post: 10-18-2001, 10:19 PM
  5. Is there a C iostream?
    By Khisanth in forum C Programming
    Replies: 1
    Last Post: 09-05-2001, 12:34 AM

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