Przykład

#include <iostream.h>

#define CONST 1.2

int main(int argc, char* argv[]){

cout << "wartość stała to " << CONST << endl;
return 0;
}

Rozwiązanie
Użyj stałej wartości typu integer lub enum.

#include <iostream.h>

int main(int argc, char* argv[]){

const int CONST = 1.2;

cout << "wartość stała to " << CONST << endl;
return 0;
}