file.open() doesn't open the text file, it opens a stream to the file so the program can read from and/or write to the file depending on the type of stream.
When a programmer says "open a file" that simply means the file is made available for reading or writing to it. It doesn't mean the content of the file is displayed or anything like that. So what exactly do you want to happen? If you want to display the text content of the file you will have to read the content and print it.
You usually don't have to do that if the file is in the same directory as either the project or the executable depending on whether or not you are running it from within an IDE or from the exe.