I can't quite find how to convert the first argument of my program to an integer—correctly.
I have tried this and I get a 0 or -1 (I'm not sure since I can't debug it either):
int main(int argc, const char *argv)
{
int arg_num = atoi(&argv[1]);
. . .
}
I would dearly appreciate it if I could get some help. I have been on this small test file for almost two days now! :boohoo:
EDIT: Well, I have found that I have been missing an extra asterisk for argv.
int main(int argc, char **argv)