Visual Studio 2022 "Cannot open source file" Problem

Mohamed El-sherif 20 Reputation points
2025-01-23T10:05:55.2466667+00:00

Screenshot 2025-01-23 123916

Hi, I have a problem , when i installed Visual Studio 2022 community i selected only this in installation detail C++ ATL and Windows 10 DSK (10.0.2348.0) and intellicode .

  • when i run code , it appears "can't open source file "iostream" "
  • identifier "cout" is undefined.

(Additional information that may help you solve the problem)

  • I have Visual studio code for python
  • I installed mingGW and deleted it again For VSC
  • I installed MSYS2 and deleted it again For VSC

notice: iam new user in Visual Studio and Learing C++ 🙃

(Sorry for the English mistakes and bad typing because I am a new learner of English)

Developer technologies C++
Developer technologies Visual Studio Other
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 49,461 Reputation points
    2025-01-23T12:16:19.7433333+00:00

    At a minimum, if you want to use C/C++ install the complete VS2022 Desktop development for C++ workload.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.