I can't get this program to compile. Gives me error that I am missing function header...Help
#include <stdio.h>
void Mystery(int A[], int size);
{
if(size>0) {
A[0] = 0;
Mystery (A+1, size - 1);
}
}
I can't get this program to compile. Gives me error that I am missing function header...Help
#include <stdio.h>
void Mystery(int A[], int size);
{
if(size>0) {
A[0] = 0;
Mystery (A+1, size - 1);
}
}
>void Mystery(int A[], int size);
Remove the semicolon here.
-Prelude
My best code is written with the delete key.
void Mystery(int A[], int size);
here you declare a function but what you are trying to do is define it so remove that semicolon and it should compile. You will need to write a main() function too.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi