Visual Studio 2022

Jun 12, 2022 at 1:31am
I am trying to learn C. I am using Windows 10. My problem right now is with Visual Studio 2022. I can't figure out how to use Visual Studio 2022 to enter a simple "Hello World!" type program. Is there an online tutorial or video that shows in detail how to use Visual Studio 2022? Or, is there something else that would be easier for a beginner? Thanks!
Jun 12, 2022 at 2:00am
With the Visual Studio Installer install the "Desktop development with C++" workload.
https://docs.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170

Then create the first C program and run it.
https://www.youtube.com/watch?v=0PUZbgcIMzg
Jun 12, 2022 at 2:11am
In VS2022, if you create a new project, set the filter to "C++/Windows/Console" and select the project type "Console App", then you get exactly that ;-)

1
2
3
4
5
6
7
8
9
// ConsoleApplication.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>

int main()
{
    std::cout << "Hello World!\n";
}
Last edited on Jun 12, 2022 at 2:13am
Jun 12, 2022 at 4:14am
Jun 12, 2022 at 4:28am
To be honest Visual Studio has a larger learning curve than some other compilers/IDEs available for C/C++ development on Windows, but once you get used to how to create the various different types of apps it is worth the effort. Visual Studio has arguably the best debugger for Windows.

Keep on plugging away! :)
Jun 12, 2022 at 9:19am
There a reason you're going for C instead of C++?
Jun 13, 2022 at 2:11am
Thank you to everyone who took time to reply.
Topic archived. No new replies allowed.