Horje
type casting in cpp Code Example
c++ cast to type of variable
x = static_cast<decltype(x)>(y);
type casting in cpp
int main()
{
	int a=20 , b= 25 , c= 19;
  	int sum = a + b + c;
  	float ave = (float) sum / 3;  //this is called type casting (float) sum 
  	cout<<"Average is : "<<ave<<endl;
  	return 0;
}
casting cpp
casting




Cpp

Related
string to wstring conversion c++ Code Example string to wstring conversion c++ Code Example
install heroku Code Example install heroku Code Example
auto i cpp Code Example auto i cpp Code Example
who made c++ Code Example who made c++ Code Example
c++ split string by sstream Code Example c++ split string by sstream Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10