7 Sept 2023, 14:18 UTC≈7,000 views31 reactionsread 19 August 2026 The Missing Semester of Your CS Education is a practical and hands-on computer science class that fills the gaps in traditional CS education. This course covers essential topics often overlooked in standard curriculum, empowering students and programmers to work efficiently and effectively within the computing ecosystem. Topics include mastering the command shell for task automation, harnessing version control for co…
👍30👎1
C/C++ Resources and FAQ pinned «List of books recommended for learning C (Beginners to Advanced) Beginner: C Programming - A Modern Approach Effective C Beej's Guide to C Programming - Free Online Book Intermediate Modern C 21st Century C - C tips from new school Advanced Linux…»
31 Jan 2023, 16:14 UTC≈7,380 views9 reactionsread 19 August 2026 Undefined Behavior Sanitizer for C/C++ explained in depth:
https://maskray.me/blog/2023-01-29-all-about-undefined-behavior-sanitizer
If you want to learn what Undefined Behavior is, you can refer to a post earlier in this channel here.
👍9
14 Jan 2023, 11:34 UTC≈6,570 views6 reactionsread 19 August 2026 File
--
Implementing Condition Variables with Semaphores
The paper discusses the implementation in C# but it is a straightforward translation to C/C++.
The reason I shared this paper is to show the thought process and the things people have to keep in mind when designing a solution for concurrency/parallel programming primitives.
All the kernels provide a semaphore as a primitive that can be used to build all the nece…
👍6
21 Oct 2022, 03:52 UTC≈5,760 views7 reactionsread 19 August 2026 The shared_ptr equivalent is similarly simple: just swap out the std::unique_ptr<T, Deletion> return value with std::shared_ptr<T>, and change the name to indicate a shared resource:
template <
typename T,
typename Deletion,
typename Acquisition,
typename...Args>
std::shared_ptr<T> make_c_shared_handler(
Acquisition acquisition,
Deletion deletion,
Args&&...args){
return {acquisiti…
👍7
21 Oct 2022, 03:52 UTC≈4,050 views5 reactionsread 19 August 2026 How can I use RAII to manage resources programmed using a C-style API?
There is an easy way to use RAII to manage resources from a C-style interface: the standard library's smart pointers, which come in two flavors:
std::unique_ptr for resources with a single owner and the team of std::shared_ptr and std::weak_ptr for shared resources. If you're having trouble deciding which your resource is, this FAQ should help yo…
👍5
2 Oct 2022, 07:16 UTC≈3,320 views7 reactionsread 19 August 2026 https://github.com/TheAlgorithms/C
👍7
2 Oct 2022, 07:16 UTC≈3,260 views5 reactionsread 19 August 2026 Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C++ for educational purposes.
https://github.com/TheAlgorithms/C-Plus-Plus
👍5
1 Oct 2022, 16:07 UTC≈3,050 views5 reactionsread 19 August 2026 A collection of lock free and concurrent data structures.
https://github.com/mpoeter/xenium
I have used some of them as a reference implementation and I can vouch for the code quality.
👍5
13 Sept 2022, 16:09 UTC≈3,090 views4 reactionsread 19 August 2026 in a larger program, it would not be.)
Of course, if the only outputs you want to see are 0 0 or 37 17, you can just wrap a mutex around the original code. But if you have read this far, I bet you already know how that works, and this answer is already longer than I intended :-).
So, bottom line. Mutexes are great, and C++11 standardizes them. But sometimes for performance reasons you want lower-level primitives (e…
👍4
13 Sept 2022, 16:09 UTC≈2,750 views7 reactionsread 19 August 2026 What is Standard Memory Model that was introduced in C++11 and how does it help?
The C++ specification does not make reference to any particular compiler, operating system, or CPU. It makes reference to an abstract machine that is a generalization of actual systems. In the Language Lawyer world, the job of the programmer is to write code for the abstract machine; the job of the compiler is to actualize that code on …
👍7
31 Aug 2022, 13:30 UTC≈2,310 views11 reactionsread 19 August 2026 Linker errors are so hard to understand because of the mangled names. Is there a way to see the actual function names instead of these weird mangled names?
When you compile and link your code, you can pass an additional option
to the linker specifying whether any error output from the linker should
show demangled names or mangled names.
Consider the following code:
void foo();
void foo(int);
int main() {
foo()…
👍11
Showing the 12 most recent of 20 posts we hold for @cpp20programming. View and reaction counts are the latest single reading for each post, not a live figure, and a recent post is still accumulating both. A view count marked ≈ was rounded by Telegram before we ever saw it — t.me prints views in full below 1,000 and to three significant figures above, so ≈1,200,000 means somewhere between 1,150,000 and 1,249,999. Unmarked counts are exact. Text is reproduced from the public post preview and truncated for length.