c++ command line arguments in ubuntu terminal -


this basic question beginning use command line arguments in programs. compile program in terminal g++ example.cpp type ./a.out , cout/cin , forth.

my question is, after have compiled program, type in terminal let know input arguments?

create output file of same program. entering in terminal:

g++ example.cpp -o example 

when compiled, run program as:

./example arg1 arg2 

even above method @petr budnik works.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -