For MS Visual C++, the following will do:

#include <math.h> //or <math>

double x=2.55;
double polynomial = 3*pow(x,3)-5*pow(x,2)+6