Cant open cpp or header files on vscode (mac)

Cant open cpp or header files on vscode!
Does anyone have any idea why?
(i’m not a pro)

Thank you

Screenshot 2021-12-06 at 1.58.20 AM

Where are these .cpp files from? Can you open them in some other program? What does Visual Studio Code display if you click “Do you want to open it anyway?”

You can also go to the terminal, change to the src/cpp directory and run the below command to help with the analysis:

user@mac% file Alarm.cpp

Possible causes are:

  • The file is corrupt
  • The file is not a text file
  • The file is a text file but uses strange encoding
1 Like