static_cast<data type in which we want to change>(data type which is change into another data type)
Know you can read code
Code:
#include <iostream>
using namespace std;
int main() {
cout<<static_cast<int>(3.09);
}
Output:
3
Its mean that float data type change into int data type because 3.09 is a float number.
0 Comments