Good afternoon I need some help to get closer to my solution, in C when it is executed by console and files are included these are declared in the main statement with a pointer to char pointers (array of Strings) but then I need to store those values in char [] or char * type variables by a function to achieve modularity and I can not. I attach part of my code
int main (int argc, char **argv)
{
char *archivo1,*archivo2;
argc=3;
nombreArchivos(cant,argv,archivo1,archivo2);// no pongo ampersand al ser cadenas
}
void nombreArchivos(int cant, char **argv, char *a1, char* a2)
{
*a1 = argv[1];
*a2 = argv[2];
}
but when I return to the main I lose the values. thank you very much