   Does this only happen in Windows 2000?
  1) Write a small program that creates a file with useful info in it2) Run the program3) Check the file4) Change the program, altering the file''s contents, compile5) Run the program6) Check the file again - the contents haven''t changedThe best fix I''ve found:1) Write a small program that creates a file with useful info in it2) Run the program3) Check the file3.5) Delete the file3.75) Refresh the folder4) Change the program, altering the file''s contents, compile5) Run the program5.5) Refresh the folder6) Check the file again - the contents have changedIs this kind of a problem native to Windows 2000 or do ther OS'' have it as well?   
  Not knowing what language you are using : Hmm, make sure you are not on some funky output mode like append or something    It''s Maxd Gaming, put in an underscore and I will beat you with a rubber ducky! { Check out my Forum } { My First Space Art (Ever) }{  My Second Space Art (Ever)  }{ A upcoming space RTS codenamed Gruntacktica . }{ . }    ;quote:Original post by maxd gaming  Not knowing what language you are using : Hmm, make sure you are not on some funky output mode like append or something   I suppose it makes no difference as to what language I''m using (C++) since this obviously seems like an OS issue. I''m using binary ostreams, which are properly closed upon exit.This is especially annoying when testing small one-algorithm programs that you run very frequently. ;quote:Original post by maxd gamingNot knowing what language you are using : Hmm, make sure you are not on some funky output mode like append or something   If he had it in append, he would quickly see that...Not sure if it is a win2k problem.  In winxp, when I do what you describe in c++, it erases the original file, and creates a new one... [edited by - tHiSiSbOb on January 12, 2004 6:14:53 PM] [edited by - tHiSiSbOb on January 12, 2004 6:15:24 PM] [edited by - tHiSiSbOb on January 12, 2004 6:15:48 PM];  Check and see if you have your hard drive in delayed-write mode. Should be under System/hardware/HDD/properties somewhere.   PiQ Software  -  Tiny KeyCounter  -  Freon 2/7 Raytracing Accelerator;  The delay is temporary and occasionally the original file as if reappears even though it''s been deleted. Refreshing helps this. tHiSiSbOb: in Win2k the file is overwritten as well, but not if some timeout is over first. That is, running a program quicly twice in a row will yield the output from the first program, but not the second (this delay is around 2-3 minutes to b´my best estimate).ApochPiQ: no such option that I can find... Can it be "Write cache enabled" under disk properties? Because it''s checked and the little help box-thingy isn''t very helpful. It just tells me Windows is all the more likely to screw up my files in the case of digital armageddon.   ;quote:Original post by Crispy  I suppose it makes no difference as to what language I''m using (C++) since this obviously seems like an OS issue.Do you realy believe that?If so do you believe you have found a bug in a function that is used millions times a day, that noboddy have noticed before and fixed?No, my friend, it is you who is the issue here..And please be a little more specific with "write a program that creates a file", post some code if you want to figure what''s going wrong.. ;  Personally sounds like he's using the noreplace flag.   Try ios::trunc- It's a life's work  :Image Hosting @ $5/3 Months :30Gig/month bandwidth Reseller Plan @ $40/3 MonthGeneric WebHost: The Cheapest Hosting Around!-ryan@lecherousjester.com   [edited by - Run_The_Shadows on January 12, 2004 6:49:53 PM];  I never actually denied that it could by my fault - it's just that I generally know my way around program code and this has been bugging me for at least a few years back now... If you can point out anything I'm doing wrong, be my guest - I'd be more than glad to know what I'm doing wrong.Anyway, try this: #include <fstream>#include <iostream>using namespace std;//takes 1 additional (random) argumentint main(int argc, char* argv[]){ofstream o("temp.bin", ios::binary);for(int i = 0; i < 100000; i++)  {  int n = argv[1][0] * i;  o.write(&n, 4);  }o.close();return 0;}Come to think of it, I've only noticed this with binary files, but then again... Agh - I don't know - it's pretty messy - by now I just know to press refresh often if I want to get the correct output back. Too tired to actually compile and run the code today...   edit: forgot the "ary" in "binary" [edited by - crispy on January 12, 2004 6:55:48 PM];  Win2K pro:FWIW my fopen style log class seems to work just as one would expect; log file has different contents on each program run. 