07-25-2023, 01:27 PM
Command-line arguments allow passing arguments to a C program when executing it from the terminal.
int main(int argc, char *argv[]) {
if (argc > 1) {
printf("First argument: %s\n", argv[1]);
}
return 0;
}
int main(int argc, char *argv[]) {
if (argc > 1) {
printf("First argument: %s\n", argv[1]);
}
return 0;
}
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos