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
Syntax of new
Syntax of new
Mar 6, 2009 at 8:57am UTC
DavidRead
(1)
If 'Test' is an ordinary class, is there any difference between:
Test test* = new Test;
and
Test test* = new Test();
Mar 6, 2009 at 10:01am UTC
kbw
(9488)
No.
Mar 6, 2009 at 12:56pm UTC
Bazzy
(6281)
BTW Those should have the star before the variable name:
Test *test =
new
Test;
Last edited on
Mar 6, 2009 at 12:56pm UTC
Mar 6, 2009 at 1:58pm UTC
kbw
(9488)
Well spotted, I missed that!
Topic archived. No new replies allowed.