M
Manish
How to construct a class such that it's objects can't be "Passed by
Value?"
Can anyone shed some light on this?
Value?"
Can anyone shed some light on this?
How to construct a class such that it's objects can't be "Passed by
Value?"
Can anyone shed some light on this?
Manish said:How to construct a class such that it's objects can't be "Passed by
Value?"
Can anyone shed some light on this?
Mike said:class C
{
private:
C(const C&);
};
Is this not addressed in your C++ text?
-Mike
Manish said:hmm... seems like a simple enough answer.
Or perhaps, I didn't pose my
question correctly, so please excuse my ignorance.
class base {
.
.
.
};
class derived: base {
do_something(base xyz); <-- can this be restricted?
};
int main ()
{
derived dr;
base ba;
dr.do_something(ba);
return 0;
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.