Tuesday, June 13, 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