I have the following code below:
int main(int argc, char *argv[]) {
int n = argv[1];
function1(n);
}
Naturally, my code gives an error because argv[] is a pointer to a char. I want to run the program with an integer that gets passed and used by a function called "function1." For example:
./program 5
How do I do this with any input, so that the n is equal to that input?