I know this is fairly basic, but I'm still stuck. So I have a function that needs to take in a variable n, so this is my main function
int main(int argc, char* argv){
sort(argv[1]);
}
And I'm calling the program like this:
./sort 4 <text.txt
But the number 4 doesnt get recognized or passed into the function. What am I doing wrong? I know that argv[0] should hold the name of program itself and each one from there on should hold the arguments.