fstream just wont create file
Hi I'm trying to use a fstream file handle doing following:

 - write to file
 - read from file
 - create file(if not existing)

the problem:
For some reason I am not able to make it creating the file.

    filepath= name + "/mails.txt";
    mkdir(name.c_str(),0600);
    log.open(filepath.c_str(), ios::in|ios::out|ios::ate);
    if(!log.is_open())cout<<"error"<<endl;
    log<<flush;

if the file exists its doing his job but when the file does not exist it wont.

fstream just wont create file
===

Hi I'm trying to use a fstream file handle doing following:

 - write to file
 - read from file
 - create file(if not existing)

the problem:
For some reason I am not able to make it creating the file.

    filepath= name + "/mails.txt";
    mkdir(name.c_str(),0600);
    log.open(filepath.c_str(), ios::in|ios::out|ios::ate);
    if(!log.is_open())cout<<"error"<<endl;
    log<<flush;

if the file exists its doing his job but when the file does not exist it wont.
