Skip to content

C and C++

October 18, 2023
September 29, 2023

libc

History of Programming papers:
A History of C++: 1979−1991
Ritchie & Thompson - Creators of C and Unix
Evolving a language in and for the real world: C++ 1991-2006
CppCon 2016: Bjarne Stroustrup "The Evolution of C++ Past, Present and Future" - YouTube

Learn C Programming with Dr. Chuck (feat. classic book by Kernighan and Ritchie) - YouTube
CC4E - C Programming for Everybody

Programming in Modern C with a Sneak Peek into C23 - Dawid Zalewski - ACCU 2023 - YouTube ❗!important, 【Modern C
Modern C and What We Can Learn From It - Luca Sas [ ACCU 2021 ] - YouTube
C Constructs That Don't Work in C++

C & GUI Programming - The MagPi MagazineThe MagPi Magazine for beginners, using GTK, some advanced concepts are intentionally not covered
The C Beginner's Handbook: Learn C Programming Language basics in just a few hours
Some obscure C features - Pancakes and computers
Duff's device - Wikiwand
C Is Not a Low-level Language - ACM Queue

7 Reasons Why You Should Keep Learning C/C++ – Simpliv LLC
Learn C The Hard Way
Learn C++
Google's C++ Class - Google for Education
C++ Tutorial for Beginners - Full Course - YouTube
cppreference.com
Learn C with these Raspberry Pi resources - The MagPi MagazineThe MagPi Magazine
Quick Links - MindView Exceptional Learning Experiences Thinking in C++ 2nd ed

Stupid C++ Tricks - YouTube
davepl/SafeStrings: Demos the proper use of C safe strings

Modern C++

Standard C++
C++ Standard Library - Wikiwand
Barry Revzin
Bartek's coding blog
Modernes C++
Learn C++ – Skill up with our free tutorials
C++ Stories
CppCon - YouTube

C++ FAQ
Templates, C++ FAQ

Stroustrup: FAQ
C++11 FAQ

Bartek's coding blog: Resources
C++20: An (Almost) Complete Overview - Marc Gregoire - CppCon 2020 - YouTube
Modern C++ (2021 Lecture & Tutorials) - YouTube Cyrill Stachniss

how Google writes future-proof c++ - YouTube

Dave's Garage
Learn Advanced C++ Techniques - YouTube

C/C++ - YouTube mCoding

unique_ptr: C++'s simplest smart pointer - YouTube
unique_ptr is NOT just for heap allocations | custom deleters - YouTube
auto_ptr vs unique_ptr vs shared_ptr vs weak_ptr in C++ - GeeksforGeeks

Fluent C++ - Jonathan Boccara's blog
Plenary: The Beauty and Power of "Primitive" C++ - Bjarne Stroustrup - CppCon 2020 - YouTube

CppNow 2023 - YouTube
Let’s Talk About C++ Abstraction Layers - Inbal Levi - CppNow 2023 - YouTube

Back to Basics: C++ API Design - Jason Turner - CppCon 2022 - YouTube
cpp-best-practices/cppbestpractices: Collaborative Collection of C++ Best Practices. This online resource is part of Jason Turner's collection of C++ Best Practices resources. See README.md for more information.
C++ Core Guidelines
isocpp/CppCoreGuidelines: The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++

AnthonyCalandra/modern-cpp-features: A cheatsheet of modern C++ language and library features.
Some awesome modern C++ features that every developer should know
What's all the C Plus Fuss? Bjarne Stroustrup warns of dangerous future plans for his C++ • The Register
C++20 Is Feature Complete; Here’s What Changes Are Coming | Hackaday
Welcome back to C++ - Modern C++ | Microsoft Learn
How C++23 Changes the Way We Write Code - Timur Doumler - CppCon 2022 - YouTube

现代 C++ 教程: 高速上手 C++ 11/14/17/20 - Modern C++ Tutorial: C++ 11/14/17/20 On the Fly
changkun/modern-cpp-tutorial: 📚 Modern C++ Tutorial: C++11/14/17/20 On the Fly | https://changkun.de/modern-cpp/

c++ - What is the difference between 'typedef' and 'using' in C++11? - Stack Overflow
Not your Grandparent's C++ (Evolution of C++) - YouTube

Tune Up Your C++ Knowledge with These Tips | ICS
Top 25 C++ API design mistakes and how to avoid them
Bartek's coding blog: C++17 in detail: Summary & Bonus
Bartek's coding blog: How To Use Vocabulary Types from C++17, Presentation
Bartek's coding blog: 17 Smaller but Handy C++17 Features

Testing a Modern C++ workflow by coding a base85 decoder from scratch

Common Misconceptions of C++ – Hacker Noon
Error Handling in C++ or: Why You Should Use Eithers in Favor of Exceptions and Error-codes
A Tour of C++ 17: If Constexpr – Hacker Noon
An Improved Thread with C++20 - ModernesCpp.com
Simplicity: not just for beginners - Kate Gregory [ACCU 2018] - YouTube

Intel Guide for Developing Multithreaded Applications | Intel® Developer Zone
The Lost Art of C Structure Packing
A Pragmatic Look at Exception Specifications

Bartek's coding blog: Everything You Need to Know About std::variant from C++17
Bartek's coding blog: Space Game: A std::variant-Based State Machine by Example
Bartek's coding blog: How To Use std::visit With Multiple Variants

abseil / Tip of the Week #153: Don't use using-directives

Books

Stroustrup: The C++ Programming Language (4th Edition)
Stroustrup: A Tour of C++ (Third edition)
Tour : Standard C++

cppfront/cpp2

like TypeScript as to JavaScript
= operator for both assignment and construction
Memory safe, sane default (module and unique_ptr)
define behavior for different metaclasses (for code generation)

hsutter/cppfront: A personal experimental C++ Syntax 2 -> Syntax 1 compiler
cppfront -- C++ Syntax 2.0 Experiment by Herb Sutter –
cppfront: Spring update – Sutter’s Mill

Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022 - YouTube cppfront: cpp2 -> cpp1, like cfront
Keynote: The Evolution of C++ - A Typescript for C++ - Herb Sutter - CppNow 2023 - YouTube inheritance

6502 CPU Emulator in C++

Dave Poo
6502 CPU Emulator in C++ - YouTube
davepoo/6502Emulator: Learning how a CPU works by emulating one

Lambda

C++ Lambda Idioms - Timur Doumler - CppCon 2022 - YouTube

POD

c++ - What are Aggregates and PODs and how/why are they special? - Stack Overflow
No more plain old data |

C++ named requirements: PODType - cppreference.com
std::is_pod - cppreference.com

Modules

C++ Modules Might Be Dead-on-Arrival
Are C++ Modules Dead-on-Arrival?
Daniela Engert - The three secret spices of C++ Modules - Meeting C++ online - YouTube

Understanding C++ Modules: Part 1: Hello Modules, and Module Units
Understanding C++ Modules: Part 2: export, import, visible, and reachable
Understanding C++ Modules: Part 3: Linkage and Fragments

Debugging

reverse-engineering#gdb

Valgrind Home
sowson/valgrind: Experimental Version of Valgrind for macOS 10.14.6 Mojave and 10.15.1 Catalina

Keynote Video: Elecia White Finds Treasure In The Memory Map | Hackaday
五大内存泄露应对之策,好文必看!

LEVEL UP Your C Debugging Skills with THIS Technique Using GDB (its hard CORE) - YouTube
Pleasant debugging with GDB and DDD
Debugging Embedded Systems With GDB? - YouTube

Finding Bugs with AddressSanitizer: MSVC Compiler | C++ Team Blog

Eliminating Data Races in Firefox - A Technical Report - Mozilla Hacks - the Web developer blog

Style Guide

Google C++ Style Guide
Google C++ Style Guide is No Good
Why isn’t it good to follow Google's C++ style guide? - Quora

Artistic Style - Index A Free, Fast, and Small Automatic Formatter for C, C++, C++/CLI, Objective‑C, C#, and Java Source Code
VS Code C++ 代码格式化方法(clang-format)_c++代码格式化_core571 的博客-CSDN 博客
Clang-Format Style Options — Clang 17.0.0git documentation

clang-format -style=microsoft -dump-config > .clang-format

Disabling warning for MSVC compiler

#pragma warning(push: 6387)
#pragma warning(disable: 6387)
// code that violate 6387
len_t len = strnlen_s(nullprt, RSIZE_MAX);
#pragma warning(pop: 6387)

#perfmatters

Bartek's coding blog: Google benchmark library
google/benchmark: A microbenchmark support library

opcm/pcm: Processor Counter Monitor

Faster than Rust and C++: the PERFECT hash table - YouTube

icl / papi — Bitbucket

Nonius: statistics-powered micro-benchmarking framework

jemalloc/jemalloc
Scalable memory allocation using jemalloc

google/tcmalloc
gperftools/gperftools: Main gperftools repository

​Intel® Threading Building Blocks
oneapi-src/oneTBB: Official Threading Building Blocks (TBB) GitHub repository. For Commercial Intel® TBB distribution, please click here: https://software.intel.com/en-us/tbb

Embedded languages

Gravity
Welcome – Wren

Script

TCC : Tiny C Compiler
cpi

Libraries

STL

C++ Core Guidelines
C++ Core Guidelines: The Standard Library - ModernesCpp.com

6 Tips to supercharge C++11 vector performance - A CODER'S JOURNEY
The World Map of C++ STL Algorithms - Fluent C++

KonanM/small_vector: Small small_vector

Simplified Wrapper and Interface Generator C bindings for various languages

A list of open source C++ libraries - cppreference.com

Flow — FoundationDB actor-based concurrency

jhuckaby/megahash: A super-fast C++ hash table with Node.js wrapper, tested up to 1 billion keys.
gperf - GNU Project - Free Software Foundation (FSF)
serge-sans-paille/frozen: a header-only, constexpr alternative to gperf for C++14 users
Frozen - zero cost initialization for immutable containers and various algorithms

facebook/folly: An open-source C++ library developed and used at Facebook. Facebook's standard library
ELI5: Folly - Battle-Tested C++ Library

HowardHinnant/date: A date and time library based on the C++11/14/17 header

Concurrency

libmill
libdill Structured Concurrency for C
Libtask: a Coroutine Library for C and Unix

sheredom/subprocess.h: 🐜 single header process launching solution for C and C++

Evented I/O

libuv|Cross-platform asynchronous I/O libuv/libuv used by Node.js, Rust, Luvit, Julia
libev used by Phusion Passenger, gevent
libevent used by Chromium, Memcached
mozy/mordor

Boost network performance with libevent and libev
libev.schmorp.de/bench.html
What's the difference between libev and libevent? - Stack Overflow
libev and libevent | Concurrency in Python
Will Do — libevent vs. libev vs. libuv

poll vs select vs event-based
poll vs select | daniel.haxx.se

libuv:
libuv/libuv: Cross-platform asynchronous I/O
libuv | Cross-platform asynchronous I/O
An Introduction to libuv
unix: remove libev · Issue #485 · joyent/libuv
Asynchronous I/O in Windows for Unix Programmers
Kazuho's Weblog: The reasons I stopped using libuv for H2O
Do rust web servers use libuv (through libgreen)? or are threads + blocking syscalls faster? any links about the topic? : rust
uvloop: Blazing fast Python networking — magicstack

GUI

C++ UI Libraries • memdump
A pretty big list of C++ GUI libraries : cpp

ocornut/imgui
Python binding available, see cross-platform-apps-desktop.md#python
An introduction to the Dear ImGui library
BEST WAY to make Desktop Applications in C++ - YouTube

Elements C++ GUI library | Elements is a lightweight, fine-grained, HDPI capable, resolution independent, modular C++ GUI library.
Elements C++ GUI library – Cycfi Research

Immediate-Mode-UI/Nuklear: A single-header ANSI C immediate mode cross-platform GUI library bindings on multiple languages
wjakob/nanogui: Minimalistic GUI library for OpenGL Python binding

idea4good/GuiLite: ✔️The smallest header-only GUI library(5 KLOC) for all platforms web, embedded
LVGL - Light and Versatile Embedded Graphics Library

CLI

harrinp/Command-line-guide: Guide to making your first command line app/game
CLI design Series - Julio Merino

empirical-soft/command-interface: Add a command-line interface to any C++ program

LoopPerfect/rxterm: Functional reactive terminals in C++ ⚡⌨️
Building Reactive Terminal Interfaces in C++ – Hacker Noon

ncurses - Wikiwand
NCURSES Programming HOWTO
Ncurses programming guide
NCURSES – New Curses

conio.h - Wikiwand for Windows

Boost

Boost C++ Libraries
The Boost C++ Libraries better docs
Boost Library Documentation
Boost Getting Started on Unix Variants
Official "Boost library" Support for Android and iOS? - Stack Overflow

Chapter 21. Boost.Program_options
Chapter 63. Boost.ProgramOptions
Boost Command Line Argument Processing « Chuck Knight's Blog

Intrusive and non-intrusive containers - 1.35.0
Avoiding game crashes related to linked lists - Code Of Honor

Building from source

./bootstrap.sh --show-libraries
./bootstrap.sh --with-python=/usr/bin/python2 --with-libraries=filesystem,python,system,thread
./b2 install

Building Boost 32-bit and 64-bit libraries on Windows

Package Manager

Does C++ need a universal package manager?

A Package Manager Manager
vector-of-bool/pmm: It's the C++ Package Manager Manager

vector-of-bool/CMakeCM: CMake Community Modules
DDS — dds documentation
A New Decade, A New Tool

xrepo
xmake-io/xrepo: 🗂️ A cross-platform C/C++ package manager based on Xmake
Xrepo: A modern cross-platform C/C++ package manager

by vcpkg maintainer
CppCon 2019: Robert Schumacher “How to Herd 1,000 Libraries” - YouTube
CppCon 2018: Robert Schumacher “Don't package your libraries, write packagable libraries!” - YouTube

vcpkg

Conan

Conan - C and C++ Open Source Package Manager
conan-io/conan: Conan - The open-source C and C++ package manager

C++ Package Management With Conan: Introduction - Ilyas Hamadouche - Medium

JFrog ConanCenter - The Central Repository for C / C++ packages
Artifactory Community Edition for C/C++ — conan documentation

cpm

cpm-cmake/CPM.cmake: 📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.

CMake and the Future of C++ Package Management | iboB
CPM: An Awesome Dependency Manager for C++ with CMake | by Leonardo Lima | The Startup | Medium

hunter

Hunter: organize freedom — Hunter documentation
Brief overview — Hunter documentation
cpp-pm/hunter: CMake driven cross-platform package manager for C/C++.

Packages — Hunter documentation

cget

download and install cmake packages

Welcome to cget’s documentation! — cget 0.1.0 documentation

scapix-com/cmodule: Non-intrusive CMake dependency management

cmodule

Non-intrusive CMake dependency management

scapix-com/cmodule: Non-intrusive CMake dependency management

Buckaroo

Buckaroo - C/C++ Package Manager 😴inactive
Buckaroo — Buckaroo documentation
LoopPerfect/buckaroo: A C++ package manager that will take you to your happy place 🏝️

Buckaroo - C/C++ Package Manager – Hacker Noon
6 Reasons Why We Distribute C++ Libraries as Source-Code
Approaches to C++ Dependency Management, or Why We Built Buckaroo

clib

Package manager for C libraries.

clibs/clib
Packages · clibs/clib Wiki

Introducing Clib — Medium
The Advent of Clib: the C Package Manager

xmake

A cross-platform Lua-based C/C++ build tool and package manager

xmake
xmake-io/xmake: 🔥 A cross-platform build utility based on Lua

bale/ursus

A transpiler/module system polyfill for C++

nodeuv/bale
ursus