I have some very bad code that should crash but I'm having difficulty figuring out why it does not crash (or even give out warnings); it works in VS2003 in release&debug and in VS2008 in debug, not in release.
Why worry? The code is erronous, so the result of executing it is undefined. Just replace your malloc with new myStruct...and don't, just don't ever write over a class with something like ZeroMemory - it just doesn't make sense. You have constructors to initialise structs and classes in C++.
But anyway - the error is in comparison of iterators (which clear does) - in VS2008, Debug mode iterators are different to Release mode iterators unless you specifically enable iterator debugging, which probably has something to do with it.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
I think you are assuming that a struct in C++ works the same way as a struct in plain old C, but alas it doesn't... well not really anyway.
When you introduce non-primitive data types into structs in C++ they cease to be simple "data structures" and become basically the same as classes only their members default to public instead of private.
My guess is when you try to overwrite the object you are writing over the beginning of its virtual table which probably contains extra debug information in debug mode. In release mode you are then probably overwriting more important class data.
Remember, the sizeof operator is not designed to get the size of an object or its virtual table.
My program creates files dynamically for that I gave location as desktop.
This code I wrote inside a fr loop, that means how many times this loop continues that many number of files will be created. For this situation how can I mention path that should able to generate any number of files.
Last Visit: 31-Dec-99 19:00 Last Update: 7-Dec-23 23:52