Beispiel
#include
<iostream.h>
#define
CONST
1.2
int
main(
int
argc,
char
* argv[]){
cout <<
"const is"
<<
CONST
<< endl;
return
0;
}
Lösung
Verwenden Sie konstante Integer oder Auflistungen.
#include
<iostream.h>
int
main(
int
argc,
char
* argv[]){
const
int
CONST = 1.2;
cout <<
"const is"
<<
CONST
<< endl;
return
0;
}