I searched around and couldn\'t find the trunc function for C++. I know I can do this:
trunc
int main() { double a = 12.566789; cout <<
If you're using an ancient C or C++ library that doesn't implement trunc, use boost::math::trunc.