float a = 5.0;
int b = static_cast<int>(a);
int a = 3;
float b = (float)a;
float var_a = 9.99;
int var_b = (int)var_a;
Code Example |
---|
Cpp :: odd numbers 1 to 100 |
Cpp :: binary search c++ |
Cpp :: c++ print out workds |
Cpp :: c++ contains |
Cpp :: sum of row s2 d array c++ |
Cpp :: find element in vector |
Cpp :: cpp while |
Cpp :: print two dimensional array c++ |
Cpp :: Reverse words in a given string solution in c++ |
Cpp :: how to slice vector in c++ |
Cpp :: c++ in cmd |
Cpp :: how to cout in c++ |
Cpp :: cuda shared variable |
Cpp :: cin exceptions c++ |
Cpp :: c++ access second last element of vector |
Cpp :: how to create 2d array using vector in c++ |
Cpp :: initialize vector |
Cpp :: Nested if...else |
Cpp :: number of nodes of bst cpp |
Cpp :: c++ data types |
Cpp :: add matic mainnet to metamask mobile |
Cpp :: uparam(ref) |
Cpp :: how to convert hexadecimal to decimal in c++ |
Cpp :: c++ count vector elements |
Cpp :: glfw error: the glfw library is not initialized |
Cpp :: print elements of linked list |
Cpp :: c++ online compiler |
Cpp :: c++ write to file in directory |
Cpp :: c++ memory address |
Cpp :: count c++ |