Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

what is const double in c++?

OpenStudy (anonymous):

A "const" declaration means that the variable cannot be changed. A double declaration means a floating point (decimal) number with double precision (meaning you can save more digits). You might use this like so: const double PI = 3.1415926535 You know the value of pi will never change, so you declare it a constant so you can just type PI instead of the number itself.

OpenStudy (anonymous):

With the const prefix you can declare constants with a specific type in the same way as you would do with a variable: const int pathwidth = 100; const char tabulator = '\t'; const double Pi = 3.1415

OpenStudy (anonymous):

Here const is a prefix and double , int , char are the data types .

OpenStudy (anonymous):

Thanks :))

OpenStudy (anonymous):

you're welcome:)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!