https://github.com/pranabdas/c-cpp
Learning programming concepts in C and C++
https://github.com/pranabdas/c-cpp
algorithms c cpp data-structures programming tutorial
Last synced: 5 months ago
JSON representation
Learning programming concepts in C and C++
- Host: GitHub
- URL: https://github.com/pranabdas/c-cpp
- Owner: pranabdas
- Created: 2022-08-05T15:32:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-13T02:53:57.000Z (6 months ago)
- Last Synced: 2025-04-13T03:25:44.808Z (6 months ago)
- Topics: algorithms, c, cpp, data-structures, programming, tutorial
- Language: C++
- Homepage: https://pranabdas.github.io/c-cpp/
- Size: 48.2 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Programming in C and C++
Follow the tutorial here -
## Quick start
Compile:
```console
gcc filename.c# linking math lib
gcc filename.c -lm# show all compiler warnings
gcc -Wall filename.cg++ filename.cpp
# specify certain standard
g++ -std=c++17 filename.cpp
```This would produce executable with default name `a.out`. You can specify the
executable name by using the `-o` flag:
```console
gcc filename.c -o program_name
```For complex programs, you can use `-g` (or `-g3`) flag to embed debugging
information. `-O` flag can be used to optimize the executable file (`-O2`, `-O3`
denotes various levels of optimization).Compiler (GCC/Clang) flags for warnings: `-Wall`, `-Wextra`, `-Wpedantic`,
`-Wunused`.## Tools
### Cppcheck
```console
apt install cppcheck
cppcheck --enable=all filename.cpp
```### Misc
Cleanup (delete) all `a.out` from the `src` directory:
```
find /workspaces/c-cpp/src -type f -name a.out -delete
```## Resources
-
-
-