C++ FAQ Celebrating Twenty-One Years of the C++ FAQ!!!
(Click here for a personal note from Marshall Cline.)
Section 40:
[40.6] Why does my DOS C++ program says "Sorry: floating point code not linked"?

The compiler attempts to save space in the executable by not including the float-to-string format conversion routines unless they are necessary, but sometimes it guesses wrong, and gives you the above error message. You can fix this by (1) using <iostream> instead of <cstdio>, or (2) by including the following function somewhere in your compilation (but don't call it!):

static void dummyfloat(float *x) { float y; dummyfloat(&y); }
See the FAQ on stream I/O for more reasons to use <iostream> vs. <cstdio>.