Something confusing to be clarified in c++. What is const for?
It is just a prefix to create a read only variables. Once added for example const int PI= 3.1416, the PI integer is fixed and not allowed to be changed!
double is just a precision definition for the integer defined. to find out more...
How to call create a function in C++?
3steps -
1. Declaration -- just meant naming the function, for example "void declaration( X)"
2. Definition-- means tasking the function " void declaration (X) { statement }"
3. Calling -- just put the "declaration(x)" to intended location in your program.
No comments:
Post a Comment