To tylko jedna z 2 stron tej notatki. Zaloguj się aby zobaczyć ten dokument.
Zobacz
całą notatkę
Parameters passed to the main function int main(int argc, char *argv[]) • argv[0] is the name by which the program was invoked ( argc is at least 1) • If argc is 1, there are no arguments • In the example: echo.exe hello, world • argc is 3 • argv[0] is " echo.exe " • argv[1] is " hello, " • argv[2] is " world " • The first optional argument is argv[1] and the last is argv[argc-1] • After the last regular pointer, there is additionally argv[argc] : a null pointer
... zobacz całą notatkę
Komentarze użytkowników (0)