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
Ctor, CopyCtor and const pointers
Ctor, CopyCtor and const pointers
Jun 14, 2011 at 9:30am UTC
ankushnandan
(64)
How Constructor, copy constuctor and overloaded "operator=" handles data members of type
1
2
int
*
const
i; cost
int
j;
Jun 14, 2011 at 9:42am UTC
guestgulkan
(2942)
A compiler will refuse to generate a default constructor or a operator= function for a class that contains constant members (or contains references)
EDIT:
It can generate a default copy constructor though.
Last edited on
Jun 14, 2011 at 9:43am UTC
Topic archived. No new replies allowed.