FRI-OS
example/posix/cpp-basic_args.cpp

Shows how to work with arguments and formatted output in C++

#include <iostream>
int main(int argc, const char* argv[])
{
std::cout << "Started as " << argv[0];
if(argc>1)
{
std::cout << std::endl << "Arguments" << std::endl;
int i = 1;
while(i != argc)
{
std::cout << "\t" << i << " - '" << argv[i] << "'" << std::endl;
++i;
}
}
else std::cout << " without arguments" << std::endl;
return 0;
}