Hello guys. I want to compare two files using a system call to DOS command fc. The problem is that fc does not open the file entered as a command line argument.
code = system("fc args ..\\o.txt");
Does anybody know how to make it work?
You can't pass the filename like that, that's just passing "args" as a string literal you need to do something like this: [CODE] // build the string.. std::string command = "fc " + (std::string)args + " ../o.txt"; // now execute the command.. code = system(command.c_str()); [/CODE] Now you're good to … Read More
Edited by JasonHippy: n/a