fstream file handling PLEASE HELP

Discussion in 'Software' started by MBlock, Jul 25, 2005.

  1. MBlock

    MBlock Private E-2

    Hey all,
    Here's my problem. I am working on a project for class and having a problem writing to my files. Here is how I am opening my files:

    fstream TempFile1;
    TempFile1.open("File1.TMP", ios::eek:ut | ios::binary);
    fstream TempFile2;
    TempFile2.open("File2.TMP", ios::eek:ut | ios::binary);
    fstream TempFile3;
    TempFile3.open("File3.TMP", ios::eek:ut | ios::binary);
    fstream TempFile4;
    TempFile4.open("File4.TMP", ios::eek:ut | ios::binary);

    The files are created as far as I can see in my explorer window. However, later in my program after these files are opened it will not write any data to these files. I write to the file via an overload of the << operator. I know this overload works because I copied my project to a new one, than erased everything inbetween when I open the files and when I am to write to them. This time it actually writes to the files. Does anyone have ANY ideas as to what could be causing this utterly and extremely annoying thing as to what could possibly cause it to not write to the file... absolutely ANY help would be very appreciated.

    Thanks
     
  2. buddingb

    buddingb Private E-2

    It's hard to say without seeing the code in between... could you post more of it?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds