in pasc(int):
long fact(int);
That declaration of a function should me in main() where you declare pasc(int)
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
As I said:
You are trying to declare the function fact(int v) inside the function pasc(int). That's not possible...
your program should start like this:
int main()
{
void pasc(int);
long fact(int);
int line,c,n,x;
//blabla
}
and then delete the line
long fact(int);
from void pasc(int)
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
~s.o.s~
Failure as a human
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
I have Made a new program..but still there is a error declaration...
i realy nid this program tomorrow so pls help me....re check
Why should we have to check your code? You should be able to tell if it works or not. And then if you have a problem, you can create a thread for that problem. If you want someone to do your testing for you, you better start making offers for payment.
That said, the code seems to work fine. At least, it compiles and runs correctly (though I only did 1 trial) on VS2005, though I was surprised by that. Few notes:
void main() // should be int main(), as per any standard of C or C++
{
int line,c,n,x;
void pasc(int); // don't declare a function within a function.
// Declare it before main() instead.
// ...rest of the code
Infarction
Posting Virtuoso
1,580 posts since May 2006
Reputation Points: 683
Solved Threads: 53