This is really basic question, I'm testing std::cout to print float's, the following works correctly:
std::cout<<10 / 3.2<<std::endl; //Output: 3.125
But when I try:
std::cout<< 500000 / 1000000<<std::endl; //Output: 0
Why is the output of my second example not 0.5? Is this automatically rounding down?
I'm compiling with g++ -std=c++14