Download
argument list n.
Skip this Video
Loading SlideShow in 5 Seconds..
Argument List PowerPoint Presentation
Download Presentation
Argument List

Argument List

62 Vues Download Presentation
Télécharger la présentation

Argument List

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Argument List

  2. #include <iostream> #include <cstdlib> using namespace std; int main(int argc, char *argv[]) { int i; for (i=0; i<argc; i++) cout<<"argv["<<i<<"]="<<argv[i]<<endl; system ("pause"); return EXIT_SUCCESS; }

  3. C:\>multiply 5 10 C:\>multiply 5 1050 #include <iostream> #include <cstdlib> using namespace std; int main(int argc, char * argv[]) { cout<<atoi(argv[1]) * atoi(argv[2]); return EXIT_SUCCESS; }