round was introduced by C99, which MSVC doesn't implement. However, you can achieve the same result (for positive numbers):
For something that will work with negatives, try this post.Code:myInt = int (45.65445 + 0.5);
round was introduced by C99, which MSVC doesn't implement. However, you can achieve the same result (for positive numbers):
For something that will work with negatives, try this post.Code:myInt = int (45.65445 + 0.5);
Last edited by anonytmouse; 12-09-2005 at 10:55 PM.