Dear all , I try with this segment to open a file through passing the file name with argv. but the file couldn't be open. please comment :
thanksCode:#include <iostream.h> ifstream input_code; int main(int argc, char argv[]) { if(argc == 1) {cout << "You need to pass in a file name to the program via the command line\n"; cin.get(); return 1;} else input_code.open(argv); return 0; }