|
-
Jul 25th, 2005, 12:02 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED]fstream
I want to carry out some file handling operations and was thinking of using the <fstream.h> library.
Code:
#include "stdafx.h"
#include <fstream.h>
int main(int argc, char* argv[])
{
fstream myStream;
char file1[20] = "testing";
myStream.open(file, ios:://problem...
return 0;
}
2 questions:
Firstly, my problem manifests itself when i type in "myStream.open"
From all the reference material and examples that I have seen online I can see that there are only 2 arguments for this function. However, the Visual C++ intellisense is telling me that the signature is actually:
Code:
void open (const char*, int, int=filebuf::openprot)
I am using Windows XP... is this the reason? Also... when I type in "ios" the intellisense does not give me options such as "app" . Instead I have "adjustfield, bad, basefield, bitalloc, bp, clear... etc".
Secondly, I just wanted to know how come all the examples show that i can use a fstream object without first using the "new" keyword? How come it can be used without instanciation?
Thanks!
Last edited by chuddy; Jul 26th, 2005 at 03:47 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|