Header for 'new'

Q

qazmlp

<new> header should be included whenever 'placement new' is used.
What header should be included when I use the normal 'new' operator like this?
int* intPtr = new int ;
 
P

Pete Becker

Ron said:
No header is required. No header is required for placement new either.

The header <new> is required for placement new. The four implicitly
declared allocation and deallocation functions (3.7.3/2) are:

void *operator new(size_t) throw(std::bad_alloc);
void *operator new[](size_t) throw(std::bad_alloc);
void operator delete(void*)
void oeprator delete[](void*);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top