cannot open source file crtdbg.h (dependency of iostream) C/C++(1696)
2022 UPDATE:
answer by @Prabhat Bhargav worked for me, but I had to change path to C:/MinGW/bin/g++.exe instead of C:/MinGW64/bin/g++.exe
Guess they changed default folder name by removing 64 (at least on windows 10).
After that it worked properly. Also if you changed the default installation folder when installing MinGW compiler, you will have to select that as your compiler path.
Problem when trying to find memory leaks by using crtdbg.h
Ok, It was impossible to answer my question with the information I gave(I am sorry). The problem was that I had a Base class and derived classes. And in the base class I did not have a virtual destructor. Adding virtual destructor fixed my problem and removed all memory leaks.
GCC memory leak detection equivalent to Microsoft crtdbg.h?
You should have a look at "Cross-Platform Memory Leak Detector", looks very similar to the crtdbg.h technique.
Related Topics
Best Bignum Library to Solve Project Euler Problems in C++
Why Is the Copy Constructor Called When We Pass an Object as an Argument by Value to a Method
Adding Signals/Slots (Qobject) to Qgraphicsitem: Performance Hit
Overload Resolution with Std::Function
Speed Difference Between If-Else and Ternary Operator in C...
When Is C++ Covariance the Best Solution
Is There a Standard Date/Time Class in C++
Two Classes That Refer to Each Other
How to Run the Preprocessor on Local Headers Only
Algorithm to Add or Subtract Days from a Date
Can a Variable Be Declared Both Static and Extern
How to Compare Two Character Strings Statically at Compile Time
Both Asterisk and Ampersand in a Parameter
Does Std::Cout Have a Return Value
Why Can't I Use a "Break" Statement Inside a Ternary Conditional Statement in C++