Why does the name of a source file affect compilation?

前端 未结 4 1058
逝去的感伤
逝去的感伤 2020-12-11 02:04

I came across something really weird when I wrote a little lotto program in C++ called \"lotto.cpp\". Everything was fine until I wrote the write-to-file for my program. Whe

4条回答
  •  旧时难觅i
    2020-12-11 02:29

    This is a linker error that states that we cannot write to the 'lotto' file on your computer while compiling. My guess is that either your program is still running, or you accidentally created a directory called 'lotto'. It's possible that your write-to-file function is keeping the application running, or itself tried to create a lotto directory.

提交回复
热议问题