About Store Forum Documentation Contact



Post Reply 
cannot create file
Author Message
SFCBias Offline
Member

Post: #1
cannot create file
I'm trying to use fstream to read and write files, but for some reason it can't open OR create files. I've been looking through this issue for some time now and its quite frustrating. I also tried using the old method of FILE* and fopen but it always returns NULL.

This is a huge problem and since it works with the server side (which isn't using esenthel) I figured it must be related to this.
06-10-2011 03:17 AM
Find all posts by this user Quote this message in a reply
PRG3D Offline
Member

Post: #2
RE: cannot create file
ofstream f;
f.open("d:\\file");
f<<"Some text\n";
f.close();

int a;
ifstream f;
f.open("d:\\file");
f>>a;
f.close();

This should work;
06-10-2011 09:32 AM
Find all posts by this user Quote this message in a reply
SFCBias Offline
Member

Post: #3
RE: cannot create file
ugh silly me, theres no problem at all. The directory didn't exist (although i thought it would be created). Thanks anyways for your help.
06-10-2011 01:13 PM
Find all posts by this user Quote this message in a reply
Post Reply