I am trying to use sample.in.txt as a test input in Xcode C++. Thus, I go to edit schema and add arguments like this.
However, when I run the project, it is still getting the input from the user and do nothing about the input file I typed on the arguments. I print the argv, then it all prints correctly.
This is my main function
int main(int argc, char** argv) {
int T;
cin >> T;
for(int i = 0; i < T; i++){
int size, shift;
cin >> size >> shift;
Array test(size);
for(int j = 0; j < size; j++){
int x;
cin >> x;
test.add(j, x);
}
test.shift(shift);
}
return 0;
}