when to use "new"
From: Rv5 (rmolney_at_adelphia.net)
Date: 11/15/04
- Next message: Ivan Vecerina: "Re: const member fn changes static data"
- Previous message: josh: "Re: Bit-shifting to multiply and divide?"
- Next in thread: Ivan Vecerina: "Re: when to use "new""
- Reply: Ivan Vecerina: "Re: when to use "new""
- Reply: John Harrison: "Re: when to use "new""
- Reply: Sam: "Re: when to use "new""
- Reply: Jason Heyes: "Re: when to use "new""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 14 Nov 2004 22:36:13 -0800
Rookie c++ question, but Ive spent the last 5 years doing Java, where
everytime I created an object I used new. In c++ I can create my objects
without and its confusing me just a little.
I have a class called polynomial. Its a nothing little class right now,
with just int variables, a basic container class. Im using it as I go
through some tutorials, but in this particular tutorial its telling me to do
polynomial *first = new polynomial();
but before I found this site I was just doing
polynomial first;
Im also struggling through pointers. I understand the basics, but fail to
see the advantage using them with my objects so quickly. Is one way better
than the other?
Thanks
- Next message: Ivan Vecerina: "Re: const member fn changes static data"
- Previous message: josh: "Re: Bit-shifting to multiply and divide?"
- Next in thread: Ivan Vecerina: "Re: when to use "new""
- Reply: Ivan Vecerina: "Re: when to use "new""
- Reply: John Harrison: "Re: when to use "new""
- Reply: Sam: "Re: when to use "new""
- Reply: Jason Heyes: "Re: when to use "new""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]