Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/09/2009, 09:06
Tet0
 
Fecha de Ingreso: octubre-2008
Mensajes: 50
Antigüedad: 15 años, 6 meses
Puntos: 2
Que hacen los dos puntos aqui

Código:
class Point {
int i, j, k;
public:
Point(): i(0), j(0), k(0) {}
Point(int ii, int jj, int kk)
: i(ii), j(jj), k(kk) {}
void print(const string& msg = "") const {
if(msg.size() != 0) cout << msg << endl;
cout << "i = " << i << ", "
<< "j = " << j << ", "
<< "k = " << k << endl;
}
};
que hace exactamente esta linea

Point(): i(0), j(0), k(0) {}

ese tipo de sintaxis nunca la había visto