News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

[SOLVED] Need help with C++

Started by Twister, August 08, 2010, 03:50:22 PM

Previous topic - Next topic

Twister

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)