C++ examples for Operator:new
Putting a Value in Parentheses to Initialize Memory That You Allocate
#include <iostream> using namespace std; int main() /*from w w w . j a va 2 s. co m*/ { int *ptr = new int(10); cout << *ptr << endl; return 0; }