cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
New operator
New operator
Oct 5, 2010 at 10:43am UTC
ShubhadaJS
(2)
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++?
Oct 5, 2010 at 11:28am UTC
hamsterman
(4538)
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.