Assoc. Prof. Wiroon Sriborrirux, Founder of Advance Innovation Center (AIC) and Bangsaen Design House (BDH), Electrical Engineering Department, Faculty of Engineering, Burapha University
1. การรับ Argument Input ผ่าน command line
myarg.cpp
#include<iostream>usingnamespace std;intmain( int argc,char** argv ){ cout <<"You have entered "<< argc <<" arguments: "<< endl;for (int i =0 ; i < argc ; i++) { cout <<"argv "<< i <<" is: "<<argv[i] << endl; }return0;}