C++ examples for Operator:new
Allocating Memory by Using new
#include <iostream> using namespace std; int main()//from ww w. j a v a 2 s. c om { int *ptr = new int(10); cout << *ptr << endl; return 0; }