skip to Main Content

I was working on vs code in C++ and suddenly an error appeared that no output was shown in the terminal. I tried

Please help guys, because this error is hindering my work. I was working in oop on large projects, and suddenly this error appeared.

PS C:UsersabdalOneDriveسطح المكتبC++ oop> g++ test.cpp -o test.exe
cc1plus.exe: fatal error: test.cpp: No such file or directory
compilation terminated.
PS C:UsersabdalOneDriveسطح المكتبC++ oop>

2

Answers


  1. The error you’re encountering related to the path mismatch.Compiler isnt able to findout the file test.cpp.Please check the path and run on the correct directory

    Login or Signup to reply.
  2. The file test.cpp is not in the same working directory (C++ oop in your case).

    So please check the path of working directory and the path of test.cpp. They should match if you want to compile and run.

    All the best!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search