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

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -