Hi guys. I cannot figure out how to do next thing.
for example i have a little progie like this:
int myfunction(int argc, char *argv[]){
int i;
for(i=0;i<argc;i++)
unlink(argv[i]);
}
int main(int argc, char *argv[]){
myfunction(argc,argv);
}
works fine, but i'm trying to do that:
int myfunction(int argc, char *argv[]){
int i;
for(i=0;i<argc;i++)
unlink(argv[i]);
}
int main(){
int argc;
char **argv;
myfunction(argc,argv);
}
and it's not working. and i got no idea how to get rid from int main declaration of argc and argv. Can anyone help me plz?