// Example of memory leak in a function (which crashes soon) #include #include using namespace std; // makes std:: available void func(){ int n=100000000; int *myVec=new int[n]; // if n is too big, myVec is NULL cout << "myVec=" << myVec << endl; for (int i=0; i