Tuesday, 13 June 2017

c++ - Two General CS Questions

When comparing two "real" numbers for equality, why should I not use the == operator, and what should I use instead?



What is the difference between coersion and casting? It is my general assumption that casting is when you force a value to be of another type like so:



int n = 9;
return double(n)/5;

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...