Skip to content

Instantly share code, notes, and snippets.

@caiquecastro
Created January 3, 2014 21:31
Show Gist options
  • Save caiquecastro/8246995 to your computer and use it in GitHub Desktop.
Save caiquecastro/8246995 to your computer and use it in GitHub Desktop.
C++ arguments function
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
cout << "Você digitou " << argc - 1 << " argumentos!" << endl;
for(int i = 1; i < argc; i++) {
cout << "Argumento #" << i << ": " << argv[i] << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment