0

Is there any difference/advantage between using any of this ways of initialization of a variable?

float A = 0;
float B = float();
float C(0);

cout << A << endl
     << B << endl
     << C << endl

Of course, the result will be the same in the 3 cases:

0
0
0
Ali Rojas
  • 549
  • 1
  • 3
  • 12

0 Answers0