CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: file creation

Threaded View

  1. #1
    Join Date
    Apr 2003
    Location
    Bangalore
    Posts
    38

    file creation

    Hi

    in my application i want to read data from file and incase file doesnot exist then new file has to be created and some default values r written to file.


    my doubt is when i use

    #include<iostream.h>
    #include<fstream.h>

    it is working properly.


    but now i changed to

    #include<iostream>
    #include<fstream>
    using namespace std;

    and it is not creating file when doesnot exist.


    the file modes that i have taken are
    fstream file;
    file.open("cache.txt",ios::in | ios::ate | ios:ut);

    can any one try this out..

    bye
    seshu
    Last edited by seshreddy; May 1st, 2003 at 10:49 PM.
    make it possible

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured