>how to create a program that has portability to work in both platforms, windows and linux.
Write 100% standard C++, or conditionally compile two different programs customized for the two operating systems.
>which function we use to round a double to the nearest int number?
You'll need to write it yourself, or use a clever workaround. Alternatively, if all you need is to print the rounded double, any formatted output option will do it for you (which opens up ideas for those clever workarounds I was talking about).
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004