'Visual Studio freezes and then closes when trying to write C++ code

I'm a complete beginner and have never used Visual Studio before. (Except for the 'Code' version)

I recently decided to learn C++ and for this reason downloaded the new 2022 version of the official studio, but as soon as I started editing the code, everything immediately froze and it crashed. And so it is every time. There is a video just below, perhaps the problem will be clearer there.

https://youtu.be/SiC8fW1LwyM

What have I tried:

  1. Reinstalling Visual Studio
  2. Visual Studio Repair

Thank you in advance for your help, if you need any more details on this problem, I will provide them, just tell me how.



Solution 1:[1]

I had the same problem In the event viewer, I found some application errors. Updating Windows 10 to the latest version helps for me. I think update KB5008878 and KB4023057 are the important ones

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1