The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => The Orphanage => Topic started by: Twister on August 08, 2010, 03:50:22 PM

Title: [SOLVED] Need help with C++
Post by: Twister on August 08, 2010, 03:50:22 PM
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)