how to change istream to float in C++ code example Example: int to float c++ int a = 3; float b = (float)a;