I am not familiar with C++ and i face the following problem.
First i would like to tell you that i am working with other library called opencascade, okey well that is not a problem.
I use the following code to import my igs file. It works well.
But I am changing the file directory always in the source file which is inconvenient. I better to define it from output window. So that the user can define the directory after compiling the program. But i couldn't make that!
cout<< "Enter the directory of your file";
cin>> Director;
cout<< "Enter the file name"
cin>> Filename;
// then the above code continue to read the file in mentioned directory.
It is also okey to combine the director and filename.
I thought this a better place as i couldn't find on Opencascade forum
wrong forum, maybe a mod can move it but if I was you I'd delete it and make a new post.
To discuss your question, you can take the path/filename from the command line, or you can ask for it once you start the program. Personally I like getting it from the command line when you run the program.
The biggest problem that I can think of is if the path/filename has spaces. So you would wrap the path/filename string in "".