how ot convert float to int in c++ code example Example: int to float c++ int a = 3; float b = (float)a;