I have a couple of questions. Call me an idiot if you wish.
How do I declare a real number variable in C++?
What is a function prototype and how is it used?
What statement do you use to get data out of a value returning function?
Printable View
I have a couple of questions. Call me an idiot if you wish.
How do I declare a real number variable in C++?
What is a function prototype and how is it used?
What statement do you use to get data out of a value returning function?
do you mean real as in positive integer?
unsigned insures that it will not have a sign (positive)...Code:unsigned int name;
//or
int name;
>>What is a function prototype and how is it used?
looks like this:
Code:int function(int,char,float); //prototype
... //other stuff
int function(int i,char a,float x) {...} //definition
real as in the set of real numbers. The datatype is float (REAL*4) or double (REAL*8).
>What statement do you use to get data out of a value returning function?
Simple assignment:
Code:data = function();