Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Casting and type conversion are synonyms: https://en.wikipedia.org/wiki/Type_conversion


The post didn't say "type conversion", just conversion, like the int with value 3 landing in memory after calling atoi("3").


The post gave the example of casting a float to an int. That is a (type) conversion.

The point is that certain casts/type conversions can change the underlying data.

> like the int with value 3 landing in memory after calling atoi("3").

That's something else entirely. People may colloquially call this "converting a string to an integer", but what we're realling doing here is parsing a string as an integer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: