In the following:
int main()
{
new int; // Works
int* pmem = 0;
new (pmem) int;// Doesn't recognize new keyword/operator/function???
}
It won't recognise 'new' in this case without including the < iostream > header. Why is that? Why doesn't 'new' require a header but placement new does? If 'new' requires a function to be defined then why does 'int* a = new int;' work? Since it's not defined anywhere, I assumed it's part of the language. However 'new (&int) int;' 'placement new' isn't part of the language?
Visual Studio gives error:
'operator new': no overloaded function takes 3 arguments