cppcheck/test/testsuites/duma/leak1.cc

16 lines
229 B
C++
Raw Normal View History

2019-03-18 06:58:12 +01:00
#include <noduma.h>
#include <iostream>
#include <dumapp.h>
using namespace std;
int main() {
cout << "Hello world!" << endl;
int* pI = new int;
cerr << "Let's leak a pointer to int" << endl;
*pI = 303;
return 0;
}