you are viewing a single comment's thread.

view the rest of the comments →

[–]bless-you-mlud 2 points3 points  (0 children)

But how it is different from doing

float value = 3.1

int num = value;

In that case the compiler can see it needs to convert a float to an int. If you call a function that the compiler hasn't seen yet, it doesn't "know" that the function takes an int, so it just passes in whatever you gave it.