Install Visualcpp c++ compiler on windows. Visualcpp is also named msvc, vcpp, visual studio, etc.
Find the visualcpp on official webpages and download:
Microsoft Visualcpp: https://visualstudio.microsoft.com/downloads
For open-source cases, the community edition is good;
For commercial
cases, the professional and enterprise editions are good,
it is up
to you to choose.
After downloading the related installer setup.exe,
click it,
and follow the installer step-by-step,
when it asks the compiler or libraries,
make sure you choose the c++ desktop version, c++ compiler,
etc.
When finishing installing,
open the visualcpp IDE,
Create
a new project,
Select empty c++ project,
Add a new item hello.cpp to the source files,
Make sure hello.cpp is open in IDE,
and copy the following code to hello.cpp:
#include <iostream> int main() { std::cout << "Hello, c++!" << std::endl; }
Then click Build/Run
button to compile and run the c++ code,
the button might have a different
name, find it by youself.
It should open a cmd window and show Hello, c++!
If it does not show that message
and reports errors,
check your installation and configure, solve the
installing problems.
Create a new project,
then
->
Click Project
on the menubar ->
Click Project
Properties ->
Click c++ ->
Click Langauge ->
Find the c++ Language standard
->
Select Preview,
..., /std:c++latest
Microsoft visualcpp c++ compiler can be used as
a commandline command
on the cmd window too,
the cmd is cl.exe
.
Copy-paste the above c++ code, save it as hello.cpp,
then open "Developer Command Prompt for VS" cmd window,
Run the compiling command:
cl.exe hello.cpp /std:c++latest
Also try:
/std:c++26
/std:c++23
Date: Nov 02, 2024
Last Update: Sep 06, 2026
Back: c++ compilers
+
Powered by:
B2 Build
| boost quickbook
+
+