I suggest to learn it with printf because for many cases this will be sufficient for your needs and you won't need to create other objects.
double d = 3.14159;
printf ("%.2f", d);
But if you need rounding please refer to this post
https://stackoverflow.com/a/153785/2815227