Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualCornstalks

Posted 24 December 2012 - 10:13 PM

You can also use a proper static_cast:

int a = 100;
float b = static_cast<float>(a); // int to float

Or:

float b = 100.0f;
int a = static_cast<int>(b); // float to int

#3Cornstalks

Posted 24 December 2012 - 10:13 PM

You can also use a proper static_cast:

int a = 100;
float b = static_cast<float>(a);

Or:

float b = 100.0f;
int a = static_cast<int>(b);

#2Cornstalks

Posted 24 December 2012 - 10:12 PM

You can also use a proper static_cast:

int a = 100;
float b = static_cast<float>(a);

Or:

 

float b = 100.0f;
int a = static_cast<int>(b);


#1Cornstalks

Posted 24 December 2012 - 10:12 PM

You can also use a proper static_cast:

 

int a = 100;
float b = static_cast<float>(a);


PARTNERS