Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Whether you have had C++ before or not, this page is made to inform you about some of the most necessary basics when writing in C++.


Panel
borderColor#dfe1e5
bgColor#eff9ff
borderWidth2
titlePage content

Table of Contents


Getting started

After downloading Visual Studio (or another compiler, though they won't be explained here), it is time to make our first project!

Expand
titleMake new project


Info

Visual Studio 2019 is used in this tutorial.

  1. Open VS and click on Create a new project. Choose then an Empty Project (make sure it is a C++ project)and click Next.
  2. Proceed by giving your project a name (e.g. "MyProject" and a location. Click Create.
  3. Your project will then open. Here, you may edit the layout of VS as you want
    Image Removedby dragging the different modules around.
    Image Added
  4. To write our code, we will need a new file in our project. To add a new file, right-click on your project name → Add → New Item. You may also use the shortcut Ctrl + Shift + A.
    Image Added
  5. Choose C++ File (.cpp), rename it if you want and click Add. The difference between a C++ File (.cpp) (often reffered to as only "cpp file" or "source file") and a Header File (.h) is very important and will be discussed later, but for now, just ignore it.
    Image Added
  6. You have now made your first project! Continue reading at this page to learn how C++ is written.




BibTeX Display Table