next up previous
Initialisieren, Kopieren und Zuweisen


X::X(const X&);


const X& X::operator=(const X&);

 
X f(X x)    // passing x by value, calling X::X(const X&)
{
  return x; // returning x by value, calling X::X(const X&)
}

X x;
X y(x);     // calling X::X(const X&)
X z = y;    // calling X::X(const X&)

x = z;      // calling const X& X::operator=(const X&)

Was ist, wenn



next up previous