User Tools

Site Tools


c:c_command_line_arguments

This is an old revision of the document!


C - C++ Command line arguments

#include <iostream.h>
#include<conio.h>
 
int main(int argc, char *argv[])
{
  char *a;
  char *b;
 
  if(argc!=3) {
    cout << "No arguments specified";
    return 1;
  }
 
  a = argv[1]; 
  b =argv[2]; 
 
  cout <<a<<b;
  getch();
 
  return 0;
}
c/c_command_line_arguments.1507802184.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki