+ 4
#include <iostream>
int main(int argc,char* argv[]) {
std::cout << "You had typed "<<argc<<" arguments\n";
int i=0;//define in for loop would used too many stack memory segment so declare it as variable would be better
while(i<argc)
std::cout << argv[++i] << endl;
return 0;
}
Paste in your code then compile
If you use windows:
run cmd prompt(win+r input cmd)
then type cd to your .exe folder after finish then type!
(your exe file name) itai hurt
Then you will see
Else linux:
run terminal
then type cd to folder where your execution file live after finish there then type
./(your executable file name) itai hurt