https://github.com/bryik/experiments-in-cpp
Notes from learning C++
https://github.com/bryik/experiments-in-cpp
cpp
Last synced: about 2 months ago
JSON representation
Notes from learning C++
- Host: GitHub
- URL: https://github.com/bryik/experiments-in-cpp
- Owner: bryik
- Created: 2018-10-01T03:33:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-09-27T02:54:09.000Z (almost 4 years ago)
- Last Synced: 2025-01-19T23:32:47.367Z (over 1 year ago)
- Topics: cpp
- Language: C++
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Experiments in C++
This repo contains little examples demonstrating certain concepts from C++. They are slightly cleaned up versions of notes I wrote during the uOttawa course CSI 2372.
## Compiling
All of the examples in `./experiments` have been tested with GCC.
To compile, run, and remove the compiled files:
1. Open a terminal in the `./experiments` directory.
2. Execute:
```bash
g++ -std=c++17 1-hello.cpp && ./a.out && rm ./a.out
```
You can wrap this in a handy bash function:
```bash
function c++ {
g++ -std=c++17 -Wall -Wextra $1.cpp && ./a.out && rm ./a.out
}
```
With this, running a single file can be done with:
```bash
c++ hello
```
## Style
This repo _tries_ to follow Google's [C++ style guide](https://google.github.io/styleguide/cppguide.html). VS Code can be configured to automatically format code in this style ([instructions](https://stackoverflow.com/a/46064866/6591491)).
Each experiment is numbered, but this indicates more about when the experiment was added rather than anything about difficultly.