Not even a whole minute before a bump, that must be a record. The "std::ifstream" object takes a char array for the first argument. So prompt the user for the file name, store that to some variable and then pass that variable to constructor. Or am I miss understanding you?
However, what I am looking for is for the user to select a file from the directory (like an open file window) and select the file with the click of the mouse.
@ OP: Duoas is not trying to be obscure here, he wants to illustrate that an IDE is basically a special purpose text editor. To further exemplify this point, I believe the third or fourth most popular development environment on our little forum is VIM.
I mean, I like vim, but I didn't think that people would actually develop too much with it. I only use it for quick, one-off edits, when it would take more time and effort to fire up my regular development environment.
My assessment was based off how steep of a drop off there would be after MSVS and Code::Blocks the next candidate is possibly netbeans or unfortunately dev-cpp. Maybe I'm over estimating the number of POSIX contributors we have here but what other dev environments do you ever hear mentioned?
AFTERTHOUGHT: Notepad++ might be another runner up.
EDIT: I haven't developed the attention span for cross-compiling yet and who ever thought that relative paths in *nix are anything like they are in Windows needs to have their head checked. For these reasons I can barely use Code::Blocks in *nix so VIM is my personal goto (pun intended) in alternative settings.