![]() |
![]() |
#1 (permalink) |
Insane
Location: The reddest state ever. :(
|
[c++] symbolic constants
I'm having trouble figuring out how to represent the value of pi in two different ways using symbolic constants. The book is giving me no useful info. Could I get some help? Thanks.
__________________
CUBS WIN, CUBS WIN!!!! - Pat Hughes "Don't surround yourself with yourself." Yes |
![]() |
![]() |
#4 (permalink) |
Insane
|
#define PI 3.1415 is the same method as #define PI 3.14 and Const PI = 3.14 wouldn't be a symbolic constant. Think about what #define does. It replaces the token PI in the source code with the number 3.14 before the code is compiled. Using this idea, a #define could be more than a number...
|
![]() |
Tags |
constants, symbolic |
|
|