return float in return value function

hi every body!

my question is: How can I return float value in return value function to the main function?
Last edited on
Structure of a function:

type name ( param1, param2, ... ){ body }

type is the return datatype passed back by the function
name is an arbitrary name for the function that will be used to call the function

In the body of the function, you have to make sure that each path the code can take ends in a return call that passes back the type specified in the function declaration/definition.

For more details on defining and using functions: http://cplusplus.com/doc/tutorial/functions/
Last edited on
Topic archived. No new replies allowed.