Code sample one:
float i=1.1f;
int j=static_cast<int>(i);
cout << j<< endl;
Code sample Two:
float i=1.1f;
int j=(int)i;
cout << j<< endl;
what's the difference between these code samples about converting in c++?
Code sample one:
float i=1.1f;
int j=static_cast<int>(i);
cout << j<< endl;
Code sample Two:
float i=1.1f;
int j=(int)i;
cout << j<< endl;
what's the difference between these code samples about converting in c++?