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
Instance of an instance
Instance of an instance
Nov 3, 2014 at 9:20am UTC
Funkist
(78)
Any way to make an instance from another instance of a class?
1
2
3
4
5
class
CLASS [...] CLASS a; CLASS b =
new
a;
Nov 3, 2014 at 9:33am UTC
tath
(408)
1
2
3
4
5
class
CLASS [...] CLASS a; CLASS b =
new
a;
or
CLASS b(a);
What you need to be careful with is copy constructor/operator:
read:
http://www.cplusplus.com/articles/y8hv0pDG/
Last edited on
Nov 3, 2014 at 9:34am UTC
Nov 3, 2014 at 11:49am UTC
Funkist
(78)
Thank you
Topic archived. No new replies allowed.