Object-Oriented Programming in C++
VS Code
We shall use Visual studio code (an open source IDE that is in very common usage) with the gcc 8 compilers. To avoid complex installation, we provide a complete virtualbox image, but also some instructions to roll your own set-up. [Please note that virtualbox is not compatible with Hyper-V, but you can install your own version of the software, see below.]
Using the virtual machine
- Download and install virtualbox.
- Download the virtual appliance (a 4.3 GByte file, so use the native onedrive client to download!).
- Start virtualbox and import the appliance (complete instructions)>/li>
The following steps show how to import an appliance in OVF format.
- Double-click on the OVF or OVA file.
- Alternatively, Select File, Import Appliance from the VirtualBox Manager window.
- From the file dialog, go to the file with either the .ovf or the .ova file extension.
- Click Import to open the Appliance Settings screen.
- Check the VM settings (see here)
- Start the VM (Called OOP in C++)
- Login as “student”, password “00PinC++2021”
- Web browser (firefox) and VS code should now start up automatically
- Try to use F5 for compiling the HelloWorld code shown.
- After that, follow these instructions to make your own example
- There are many more relevant instructions in the menu on the left of the instructions under point 9!!
Setting up your own environment:
VS code is available for many platforms (https://code.visualstudio.com/Download), so you can install your own easily. Note, however, that we shall insist you use the gcc-c++ version 8 (higher versions, especially version 9, are probably OK) compilers: Mac users: Clang is not acceptable (MacPorts has https://ports.macports.org/port/gcc8 ) and for windows users you can use mingw as explained here, or WSL2 (windows subsystem for linux), see here.
The instruction on the website https://code.visualstudio.com are a great help