Topic: Sanity check
Author: sorry@but.spammed.out (Howard Hinnant)
Date: 1998/02/14 Raw View
Assuming a fully conformant compiler and lib, is the following program
legal C++, and does it behave as the comments suggest? (I don't care
whether or not it is good code, just whether or not it's conformant).
#include <math.h>
#include <stdio.h>
int main()
{
float a = pow(10.f, -1); // calls std::pow(float, int)
std::printf("a = %f\n", a);
}
Thanks,
-Howard
hinnant@lightlink.com
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]