No, you wouldn't get a warning if you were typecasting it. I'd guess what you're doing is actually just assigning it to an int
Code:
float foo = 5.6;
int bar = foo; // This produces a warning for the implicit cast
int baz = (int)foo; // This doesn't produce a warning
// Now keeping in mind that this doesn't round, it just knocks off the decimal, then
// consider trying something like this:
int qux;
if (foo - (int)foo < .50)
qux = (int)foo;
else
qux = (int)foo + 1;
// Lastly, if you're not interested in creating a new int variable. Then you can
// use the ?: conditional operator in any statement, assuming you don't mind the clutter:
std::cout << (foo - (int)foo < .50 ? (int)foo : (int)foo + 1);