C++ pairs low-level control with high-level abstractions, which is why it powers games, browsers and performance-heavy software. This workspace comes with g++ installed, so you can compile and run a C++ program from the terminal with no toolchain to set up.
g++ is installed and ready. Compile main.cpp with g++ main.cpp, then run the produced binary with ./a.out.
The full cloud editor with an integrated terminal, the C/C++ extensions and a build-and-debug config in the .vscode folder.
Clone, commit and push from the terminal, or connect a GitHub repo whenever you're ready.
Boots in about a minute, with the compiler already in place so there's nothing to install first.
C++ is a compiled, general-purpose language that builds on C with object-oriented features, templates and a large standard library. It gives you fine control over memory and performance while letting you write at a higher level when you want to, which is why it's used for game engines, browsers, trading systems and more.
This workspace is a minimal C++ starter. It ships a single main.cpp that prints a greeting, so you have a program that compiles and runs from the start and a clean base for learning the language or working through exercises.
The starter is one file, main.cpp, with a standard main function that writes Hello, World! to std::cout. g++ is already installed, so there's nothing to configure before you compile.
The .vscode folder includes a build task and an lldb launch config, so you can build and debug from the editor as well as the terminal. It's a deliberately small setup so you can focus on the code.
Open the terminal and compile with g++ main.cpp. By default that produces an executable named a.out, which you run with ./a.out. To choose the output name, pass -o, for example g++ main.cpp -o app and then ./app.
To debug, use the build-and-debug config in the .vscode folder. It compiles the active file with debug symbols and launches it under lldb, so you can set breakpoints and step through your C++ code.
Console programs, algorithm and data-structure practice, command-line tools, or experiments with templates, the STL and memory management. Split your code across multiple .cpp files and compile them together as the project grows, or add a Makefile once you want a repeatable build.
Open the terminal and run g++ main.cpp to compile. That produces a.out by default, which you run with ./a.out. Use g++ main.cpp -o app if you'd prefer to choose the output name.
g++, the C++ front end of GCC. The README compiles with g++, and the editor's build task is set up so you can also build the active file from the Run and Debug panel.
Yes. The .vscode folder ships a build-and-debug config that compiles with debug symbols and launches under lldb. Set breakpoints in main.cpp and start it to step through your code.
No, this template is a console program that prints to the terminal. There's no browser preview, since C++ programs here write their output to standard output.
Yes. Add more .cpp and header files in the workspace and compile them together, for example g++ main.cpp utils.cpp -o app. For a bigger project, add a Makefile so the build is one command.
C++ runs on a paid Studio plan. Templates that are free to launch are marked as such, and you can upgrade from the pricing page to use this one.