Quantcast
Viewing latest article 23
Browse Latest Browse All 40

Answer by Zan Lynx for getline(file, text) exhibits strange behavior : stuck reading a ghost line

Obviously, your program is not running from the directory you think it is.

Visual Studio is particularly bad about this, I find. You'll need to go into the Properties for the project and see where the current directory is set to. Either that or run it from a terminal yourself.

Edit every copy of that text file that you can find and make each one unique, then you will see which one is being used.

Also important is to know that CMake only runs those file copy operations ONE TIME, when cmake is executed. Not every time you build the project. You can arrange to do that, but it would be a custom target, not a file(COPY) operation.


Viewing latest article 23
Browse Latest Browse All 40

Trending Articles