cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Dynamic
Dynamic
Aug 1, 2013 at 10:19am UTC
akif13
(18)
Hello guys,
I'm still new to c++. I want to know what is meant by "create an object of Pizza dynamically". Can anyone explain to me and maybe give me some examples. Thanks in advance.
Aug 1, 2013 at 10:27am UTC
MrHutch
(1822)
I'm guessing you're being asked to allocate dynamic heap memory.
Assuming you have an object called Pizza.
Pizza *my_pizza =
new
Pizza();
Don't forget, you'd later need to free the memory using
delete
.
Aug 1, 2013 at 10:50am UTC
akif13
(18)
Ok, thanks
Topic archived. No new replies allowed.