Search code examples
c++programming-languages

Most Common Mistake done/seen in C++


Possible Duplicate:
What C++ pitfalls should I avoid ?

What is the most common mistake in C/C++programming that you keep committing or see most of the people do? Being aware of it atleast subconsciously will increase my or anyone's chances of committing it.


Solution

  • Wrong memory management in all kinds of ways - new without delete, delete on the wrong pointer, unclear ownership of a pointer with resulting memory allocation / deallocation problems etc.