need detailed explanation on the 'new' operator in C++. Can somebody explain why the following works:
int *n = new int(10); // initialize the pointer to integer as '10'
cout << *n; // o/p -> 10
but this does not work?
int p = new int (10); // error: invalid conversion from 'int*' to 'int' [-fpermissive]