Ich lerne immer noch C++ und versuche es zu verstehen. Ich war auf der Suche durch einige Code und sah:Variablen nach dem Doppelpunkt in einem Konstruktor
point3(float X, float Y, floatZ) :
x(X), y(Y), z(Z) // <----- what is this used for
{
}
Was ist die Bedeutung der ist "x (X), y (Y), z (Z)" neben den Konstruktor der Parameter zu sitzen?
Duplizieren von http://stackoverflow.com/questions/1272680/c-constructor-syntax-question-noob. Siehe auch http://StackOverflow.com/Questions/1632484/C-Initialization-Question – outis