I have created a Command line tool application ( Xocde --> New App --> Command line tool) and its running without any problem, Now i want to run it through terminal and pass some command line argument, something like this
int main(int argc, const char * argv[])
{
std::cout << "got "<<argc<<" arguments";
for ( int i = 0; i<argc;i++){
std::cout << "argument:"<<i<<"= "<<argv[i];
}
//// some other piece of code
}
(一) 终端机上一台
>open VisiMacXsltConverter --args fdafsdfasf i am getting output
got 1 argumentsargument:0= /Applications/VisiMacXsltConverte
我想通过指挥线知道,通过这一论点的途径是什么。