Menu

Problems with Dev C++ projects on WinVista

2009-07-31
2012-09-26
  • Brandon Curd

    Brandon Curd - 2009-07-31

    I am a C++ programmer using the DEV C++ compiler. I created a tile-based map editor and also created a header file to allow the maps to be loaded into other programs. The maps are saved in the ".dat" format.
    When I was using XP, the editor and all of my programs using the header file worked flawlessly; however, now that I have Vista, the map loading does not function properly.

    When I save the file and then immediately load the same file in the editor, it loads properly until I close the program and run it again.
    Also, the file sometimes loads maybe three times if I just run the program, but after that it won't load anymore.
    I monitored the program's actions and apparently the program is able to extract the map's data, but it closes after it exits the function.
    I use the very same file saving and loading method in other programs, but they do not crash when the code is executed.
    The map files are 1.74 MB in size.

    Could someone please explain why this occurs?

     
    • cpns

      cpns - 2009-07-31

      > I am a C++ programmer using the DEV C++ compiler.

      Dev-C++ is not a compiler.

      > Could someone please explain why this occurs?

      Yes; your code has a bug. What more can we say without seeing the code!? The fact that it runs on one machine and not another is irrelevant. The symptoms indicate perhaps uninitialised data or buffer overrun. The results of such errors are non-deterministic, and that includes apparently working correctly.

      Clifford

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.