I would like to run the following code with several integers as arguments, how to set up the script/configuration in code::blocks?
1 2 3 4 5 6 7 8
|
#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc, char* argv[]) {
for(int i = 1; i < argc; i++)
cout << atoi(argv[i]) << endl;
}
|
Last edited on
code blocks has nothing to do with it. Just write it like you want...
You can specify arguments in Project/Set programs' arguments.
Athar, you are exactly right. I also confirm your message from codebolcks manual. It works.
I appreciate your help.