Show HN: C/C++ Cheatsheet – a modern, practical reference for C and C++

Posted by crazyguitar 1 day ago

Counter10Comment6OpenOriginal

Hi HN,

I’m the creator of C/C++ Cheatsheet — a modern, practical reference for both C and C++ developers. It includes concise snippet-style explanations of core language features, advanced topics like coroutines and constexpr, system programming sections, debugging tools, and useful project setups. You can explore it online at https://cppcheatsheet.com/.

I built this to help both beginners and experienced engineers quickly find clear examples and explanations without digging through fragmented blogs or outdated docs. It’s open source, regularly maintained, and contributions are welcome on GitHub.

If you’ve ever wanted a lightweight, example-focused guide to: - Modern C++ (templates, lambdas, concepts) - C fundamentals and memory handling - System programming - Debugging & profiling …this site aims to be that resource.

Any feedback is welcome. Thank you.

Comments

Comment by pjmlp 22 hours ago

I haven't searched much, but failed to find anything related to bounds checking, or enabling hardned runtimes for C++, which I consider a must-have in any modern project.

Also probably something similar for C, like using SDS (https://github.com/antirez/sds) instead of standard library calls.

Other than that, great work.

Comment by crazyguitar 18 hours ago

Thanks. This is a awesome suggestion. Will dive deep what is the better way to do.

Comment by Neywiny 7 hours ago

This isn't a cheat sheet. It's a guide.

Comment by nmaleki 20 hours ago

This is cool, but I usually expect a cheat sheet to be a 1 or 2 page pdf.

Comment by aeve890 20 hours ago

If you Google "modern c++" you will probably find ~c++11 tutorials and posts and less and less content on the latest c++ standards where some things considered "modern" a few years ago are already deprecated or not considered "best practices" anymore.

I'd check this[0] excellent mega rant about c++ and take the best parts to create a truly "contemporary c++" cheatsheet.

[0] https://youtu.be/7fGB-hjc2Gc?si=4bk2nKx2AXPYLJH7

Comment by crazyguitar 18 hours ago

Thank you for sharing this excellent resource! You make a great point—searching for "modern C++" often surfaces C++11-era content, while newer standards have already deprecated some of those "modern" practices. That's exactly why I created this project: to continuously update and document contemporary best practices as the language evolves. I'll definitely check out the linked rant for ideas to incorporate. Thanks for the suggestion!