I have written a console application in C++ and I need to read the file that is opened with my console app:
txt
fileopen with
then I want to read that .txt
file. how?
You just need to declare arguments to your main like this:
int main(int argc, char *argv[])
{
...
}
And the file path will be passed as one of the argument. If you open multiple files, it will run one process per file.