Because 'x' is a pointer. You cannot [normally] assign an integer value to a pointer. You assign it to an integer.
1 2 3 4 5 6 7 8 9 10 11
// why is this not printing 5
int *x = newint(5);
cout << x << endl; // <- x is a pointer. This prints the contents of the pointer, which is an address
cout << &x << endl; // <- this prints the address of x
cout << *x << endl; // <- this "dereferences" x (that is, looks at what it points to), so this will print 5
// you could also do this to assign it:
*x = 5;