Thread: Directory woes....

  1. #1

    Directory woes....

    I've searched the boards but found nothing too solid.
    I'm trying to find a "standard" C++ (Console) way to

    -check if a subdirectory in my current directory exists,
    ----if not----
    -make it, so the prog can save a file there.

    VC++ 6.0 + Win2000 but if possible applicable to UNIX.

    What i have here, doesn't even create the dir.
       fstream Fin("\\save\\scores.tmp", ios::in | ios::out | ios::binary);
    This works fine (current dir only)
       fstream Fin("scores.tmp", ios::in | ios::out | ios::binary);

  2. #2
    It's alright

    I got it working

    ...Not sure bout linux but we'll see...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 02:54 AM
  3. Finding files in a directory
    By smarta_982002 in forum C Programming
    Replies: 1
    Last Post: 01-25-2008, 10:10 AM
  4. Replies: 6
    Last Post: 07-30-2003, 03:08 AM
  5. Directory reading trouble
    By samGwilliam in forum Linux Programming
    Replies: 0
    Last Post: 03-10-2002, 09:43 AM