Hi, I am a very beginner for C++, and I'm learning a tutorial for beginners. In Chapter 15, the tutor jumps to MFC about how to create a Game -Maze. I followed his steps, and I wasn't wrong. Now I wanted to create it again, just after a few steps my compiler VC 6.0 always reminded me of errors. I checked and recreated the code for several times yesterday and today, but I don't figure out.
Here's the error: error C2573: 'GameWnd' : cannot delete pointers to objects of this type; the class has no non-placement overload for 'operator delete'.
Use ::delete, or add 'operator delete(void*)' to the class
The compiler points to Line 21 about the error.
Should I post all the "head" and "cpp" in order to solve the problem? Please advise. I don't know how to appropriately post the context.
There are no obvious faults in your code so it's difficult to say where the problem is.
Here is a template I use for MFC demos. Try if it works for you. https://www.dropbox.com/sh/vfqts8xfbv4qgj5/AABL11f2NWNjFqQme0-QaSYAa?dl=0
BTW Why do you still use such an old IDE like VC 6.0 ?
You can get Visual Studio Communities editions for free - they also have MFC included.
Thank you so much for taking your precious time to help me, Thomas.
I found the problem myself. Mostly I am very careless. Today I followed the video very carefully step by step, what the tutor demonstrated but still failed. I hadn't gotten the wrong warming before. I started speculating it might be due to the damage of the software. I reinstalled just now. Hurray, I don't get the warning again.
I teach myself C++ from scratch. I didn't hear about other compiler until very recently. I still use it because the tutor on the video used it. I tried to install VS but I don't even know how to creat the a new project and I don't know where "insert", etc. are.
I know the tutorial I used is not very desireable. It's outdated. When I posed the code I transcribed from there and asked on the forum here, and some experienced forumites frowned upon that. For example, they told me to avoid using "using namespace std", but the tutor instructed.
However I think that is very helpful for me, as I knew nothing about programming before, because the tutor demonstrated every step. I have the book named C++ Primer Plus. I thrumbed through it, but it is still difficult for me. I'll adopt another better tutorial when I finish this.
I was so frustrated that I couldn't move on along the tutorial. I really really appreciate you would like to help.