cppcheck/test/testsuites/duma/wrong1.cc

17 lines
292 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;
*pI=2;
delete(pI);
cerr << "Now deleting a pointer twice..." << endl;
delete(pI);
cerr << "Did you notice?" << endl;
return 0;
}