Hello Vikki,
Thank you for your question and reaching out.
I can understand you are facing issue with C++ files in Windows 11.
- Please try to Install C and C++ support in Visual Studio using below link.
https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170 - Please verify file associations type for .cpp ( c++ ) have been set correctly to open them Visual studio.
- Windows Settings -> Apps category -> Default apps tab -> scroll down to the bottom of the screen and click the Reset button beside “Reset all default apps.”
-----------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept as answer--