ofstream a_file Help

This is a discussion on ofstream a_file Help within the C++ Programming forums, part of the General Programming Boards category; Is there a way to get c++ to make a folder and with in that folder have a txt file? ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    33

    Question ofstream a_file Help

    Is there a way to get c++ to make a folder and with in that folder have a txt file? If so is there a way to get the folder to open when the user does something? Thanks for help. Any tutorials on ofstream would be nice. Thanks again.

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    What do you mean "open when the user does something?" Are you implying a file manager? In general, yes it is possible.

    Kuphryn

  3. #3
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    I did a board search and behold the wisdom of one of preludes posts!

    Code:
    //done for winxp pro 
    #include <windows.h>
    CreateDirectory ( "C:\\name", NULL );
    more help:

    http://msdn.microsoft.com/library/de...edirectory.asp

    All found at this thread:

    Creating a folder

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    33
    My program is a register for a photo guy and it sets an id for each customer and i need it to create a folder named id(001,002..ect) and when the user wants to see pictures of a certain customer they type in the id number and it finds the folder and opens it so the user can look at the pictures.

  5. #5
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    I fail to see a question in that last post, almost seems as if you want us to write your code, which we dont do. Follow the links i provided and you will find your answers.

  6. #6
    Registered User
    Join Date
    Apr 2003
    Posts
    33
    ok thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ofstream and FILE behaviour
    By MrLucky in forum C++ Programming
    Replies: 7
    Last Post: 06-21-2007, 06:45 PM
  2. Ofstream... broke as a result of ifstream fix
    By tms43 in forum C++ Programming
    Replies: 3
    Last Post: 11-12-2006, 11:40 AM
  3. Capturing key presses
    By cgod in forum Windows Programming
    Replies: 6
    Last Post: 11-25-2004, 01:10 PM
  4. Using ofstream in private of a class-errors
    By loobian in forum C++ Programming
    Replies: 3
    Last Post: 12-13-2003, 10:06 PM
  5. ofstream and ifstream for searching and writing
    By johnnyd in forum C++ Programming
    Replies: 6
    Last Post: 03-17-2003, 08:34 AM

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