New operator

Hi,

What is the exact use of 'new' operator in c++?

In Java everytime for creating a new object we use 'new'., but why not so in c++?

new allocates dynamic memory. dynamic memory is used when, at compile time, you can't decide how much memory you will need (or if you're going to need any at all). see http://www.cplusplus.com/doc/tutorial/dynamic/
Topic archived. No new replies allowed.