JustSomeGuy wrote in news:tM62b.826260$3C2.18698362
@news3.calgary.shaw.ca:
In MS Visual C++ 6.0
Where is M_PI defined?
Where is round defined?
They are not defined in standard C++, If you need to know about
Visual C++ ask in one of the ms newsgroups, or do this:
#include <iostream>
#include <ostream>
#include <iomanip>
#include <cmath>
#include <limits>
double const m_pi = 2 * acos(0.0);
inline double round( double d )
{
return floor( d + 0.5 );
}
int main()
{
using namespace std;
cout << setprecision( numeric_limits< double >::digits10 );
cout << m_pi << endl;
cout << floor( m_pi ) << endl;
cout << floor( -m_pi ) << endl;
cout << ceil( m_pi ) << endl;
cout << ceil( -m_pi ) << endl;
cout << round( m_pi ) << endl;
cout << round( -m_pi ) << endl;
}
HTH
Rob.
--
http://www.victim-prime.dsl.pipex.com/