Possible duplicate:Is there a difference between type and type conversion?
I personally use the terms "casting" and "conversion" interchangeably. It's right? If not, what is the difference?
The conversion entails building a type A from an instance of another type B.
Casting entails the use of one or more diverse casting operators in C ++ or casts in the style of C.
I donโt think they are the same - casting forces the compiler to perform an explicit conversion, but you can also have implicit conversions, for example.
double d = 23; // implicit conversion from int to double
Versus:
int i = static_cast<int>(23.0); // explicit conversion from double to int
, . : ", ". , , .
- . - , , atoi itoa, . :
int minutes_to_seconds(int minutes) { return minutes * 60; }
Source: https://habr.com/ru/post/1774572/More articles:A cleaner / shorter way to solve this problem? - pythonHow to deal with CSRF (I think)? - securityASP.NET Authentication Issues - authenticationSvn comments added to file in commit? - svnDuplicate an item from one list to another using jquery sorting - jqueryPorting DirectX to OpenGL ES (iPhone) - opengl-esSubmitting images as part of form data from iPhone - iosDebugging ASP.NET MVC Site Performance Issues - performanceHow to get a list of current online users of the facebook application? - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1774577/using-maven-without-my-own-repository&usg=ALkJrhigJ47B0Cjms9-gqCZPvmBueGIydAAll Articles