0

I am trying to pass the arguments from the terminal into another function.

Here is my code:

int main(int argc, char *argv[])
{
    cprint(argc, argv);

    return 0;
}

void cprint(int a, char *argv[]){
    printf(a);
    printf(argv[1]);
}

I keep getting the error:

error: conflicting types for 'cprint'

previous implicit declaration is here
cprint(argc, arguments);

Any ideas how to implement my objective? Thanks in advance!

A.Nassar
  • 27
  • 5

0 Answers0