----------- When I did following, program crashed ---
CMyclass1 * pclass = new CMyclass1()
There are 2 reasons:-
1. If you give SOMEVALUE=3 and copy "some value" it will fail and program will crash, so please check that.
2. what is need of memset when you are allocating in a stack?, Doing this also fails.
So handle heap allocation carefully.
I've posted this question on other boards, but nobody has managed to suggest me the slightest of solutions.
I'm fairly new to programming C++ interfaces - I'm using Win32 API, not MFC. I know the basics through theForger's tutorial. Before coming to the programming world, I've been working as a web and graphical designer, which naturally makes me want to customize everything in my C++ applications. Specifically I want to decide how the window should look from the title bar to the minimize button to how individual buttons or tabs looks.
What are the template parameters of the vector? Also, if you have an infinite loop (which you have) I'm not surprised that you get an error - you're going to exhaust memory.
When you post a code sample, it helps if you a) select the "Encode HTML tags when pasting" option below the posting edit box and b) put it in a code block (select the code and then click the "code block" thing above the posting edit box.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
Are you reading/writing to the vector from multiple threads? VS2002 had some sort of non-standard thread safety implementation. A few months ago I upgraded a HUGE project which was reading/writing to std:vector and std:map from VS2002 and the application showed absolutely no evidence of race conditions. Once I upgraded the project to VS2008 it was crashing everywhere. I ended up deriving a class from std:vector/std:map and using a mutex to synchronize reads/writes.
I'm using VC++ 6.0 for developing a Unicode application. It works fine, but I have a problem with Unicode output in the debug window. As described everywhere, I checked "Tools->Options->Debug->Display Unicode strings" and I use the TRACE0, TRACE1, etc. macros. But Unicode characters are still shown as '?'.
Does anyone has a solution for this? Thanks in advance...