6

What is the difference between:

long myLong;
float myFloat = (float) myLong;

and:

float myFloat = float(myLong);
Peter Alexander
  • 53,344
  • 14
  • 119
  • 168
peter
  • 61
  • 2

1 Answers1

3

There is no difference except for syntax, but in C++ you should really be using the templated casting functions

Radiodef
  • 37,180
  • 14
  • 90
  • 125
Graphics Noob
  • 9,790
  • 11
  • 46
  • 44