Quote:
Originally posted by Androto why did you change th ints for the squars function into doubles as well? |
Lets start with communication.
The first thing I wondered was: "what is
squars?".
Then I hope to find out by analysing the squars() function. But it doesn't help me much. Then I look at the
return type and the types it accepts as its
arguments. What I see is this declaration:
Code:
double squars (int x, double y=0);
Then I see this implementation:
Code:
int squars (... float y[0])
{
... {
...
...
... }
return y;
} You are returning a "float", yet your function hints on returning an "int". I have nothing else but to gamble -return a float, and leave the rest. Or... return the int but change the second argument into an int.
I've chosen the first option. All of because I Don't know what a
squars is.
Name your variables and functions right. Make sure a stranger (like me) knows what you mean and want.
********************************
Quote:
Originally posted by Androto on that tutorial site you posted, the definition of a double is: double precision floating point number. but what does that mean?
also, how would you include that other way of making the program pause at the end? i remember the words void being part of it. |
To answer your first question:
It means it is twice as precise as a float(ing) point variable.
The answer to your second question is even more simple:
All you need to do is to go back to here
http://codenewbie.com/forum/t2403.html and read my code. Copy and paste the functions then use them. That's all. It's for free too

.
Quote:
|
but i still don't know how to do that system("pause") the way you did it.
|
Well, if you are a bit more patient, then you will receive an answer too. Posting the same question twice within a few moments doesn't help

. Read my answer above this one (the link) and you'll have your answer.