User Tools

Site Tools


c:c_command_line_arguments

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.txt · Last modified: 2020/07/15 10:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki