I’m using C++ in Visual Studio, and I need to be able to view multiple C++ files. I also need to be able to run those previous files as well as my current file.
I have tried Visual Studio Community 2022 as well as Insiders 2026, but I cannot find a way to reliably do it. I tried the CMakeLists.txt method, but then I have to define each new script within the txt and I cannot do that every time I need to run a program. I tried using the open folder option, but it asks for a directory file, and I cannot figure out how to do that and it seems like it would run into the same issue as CMake. I tried adding multiple programs to the same solution, but it just won’t let me only select the one I truly want to run, and going into the properties and turning of inclusions for each program again takes too long.
The main issue seems to be that I need multiple programs to have the main() designation, and Visual Studio doesn’t know what to do at that point.
main(). See: What are solutions and projects in Visual Studio?.