Home / Tools & Plugins / 20 Most Useful C and C++ Cheat Sheets | 2018 Edition

20 Most Useful C and C++ Cheat Sheets | 2018 Edition

[Estimated read time: 6 minutes]

C and C++ both was developed with a bias toward system programming and embedded, large systems, with flexibility, efficiency, and greater performance. They have been found extremely helpful in other contexts as well, with key strengths being resource-constrained and applications and software infrastructure, which includes performance-critical applications (space probes, telephone switches), servers (SQL, eCommerce) and desktop applications.

Numerous vendors provide C++ compiler, including Microsoft, IBM, Intel and Free Software Foundation, and this makes the language even more popular. In fact, almost all programmers start coding in C or C++. We’ve gathered a few cheat sheets, references and resources that will help both amateurs and experts to write code efficiently in less time.

20. Cheat Sheet by Leupi

Format: Online Webpage and PDF

This is a single page cheat sheet that contains boolean logic, auto datatype, preprocessor, basic operators, pointers, null-based loops, multithreading, standard system types and their range.

19. Dummies Cheat Sheet

Format: Online Webpage

The cheat sheet provides information on C++ mistakes, syntax and header files. All information pertains to Mac, Windows and Linux computers.

18. C++ Reference Card

Format: PDF

The reference card contains basic operators, console input/output, functions, inheritance, dynamic memory, exceptions and operator overloading.

17. Quick C++ Reference

Format: Online Webpage

It’s a compact single page reference containing C++ preprocessor, syntax, logical AND, OR and XOR lookup table.

16. Differences in C++ and Java Syntax

Format: Online Webpage

This cheat sheet covers two major things – the main function and how to compile it, followed by numerous little differences in C++ and Java.

15. Standard Template Library

Format: Online Webpage

If you are not new to C++, you might know that templates allow functions and classes to operate with generic types. It enables the class or function to work on several data types without being rewritten for each one. This page covers all features of standard template library.

14. C Reference Cheat Sheet

Format: Online Webpage and PDF

Here you will get C syntax, data types, console and file input/output structure, common library functions, ternary and assignment operators, and more.

13. C++/CLI Cheat Sheet

Format: Online Webpage

The page provides a quick comparison between C# and C++/CLI. It explains which C++/CLI language construct correspond with which in C#. Instead of making it a complete guide, the author only includes the features that are most unclear.

12. C++ Coding Standards

Format: Book

It’s a valuable set of tried-and-true rules, best practices and guidelines. The topical sections it covers are – design and coding style, class design, type safety, namespaces, modules, error handling, exceptions, algorithms, and more.

11. C++ Quick Reference

Format: PDF

This one tells you the how syntaxes are written and what’s their role. It includes commands related to preprocessors, declarations, strings, vectors, classes, namespace, templates, literals, statements, expressions, C/C++ standard library, and more.

10. C++ for Dummies by Stephen Davis

Format: PDF

Understanding and coding in C++ is easier when you know the declaration, expressions, and operators to perform calculations. This cheat sheet covers all of these.

9. Modern C++ language and Library Features

Format: Online Webpage

The page includes C++17, C++14 and C++11 language features, and new library features. Most of the descriptions and examples are taken from numerous sources, and summarized in simple language.

8. Unicode-enabling Microsoft C/C++ Source Code

Format: Online Webpage

This is a cheat sheet to convert Microsoft C or C++ source code to support Unicode. It presumes you’re already familiar with Microsoft’s approach to Unicode, thus doesn’t explain much. The objective is to have a single place to look for names, correct spellings of relevant functions, date types, etc.

7. C Cheat Sheet

Format: Online Webpage

It’s a simple and lengthy page that covers almost all basic aspects of C programming language. From rules of writing, compiling, and executing code to data types and placeholder, you’ll find it all under one place.

6. C++ containers

Format: PDF

For Standard Template Library containers, this table shows an overview of its methods, and distinguishes between functions available from C++11 and those present in C++03.

5. C/C++ Facts

Format: PNG Image

JetBrains team ran some interesting market research studies. They provided insight into the C/C++ market, like who are C/C++ developers, what are popular compilers and debuggers, and other programming languages used along with C++.

4. C++ Syntax Cheat Sheet

Format: Online Webpage

As the name suggests, the cheat sheet contains some key syntaxes along with explanations, including namespace, strings, exceptions, classes, inheritance, and more.

3. Ultimate Cheat sheet for C++

Format: Online Webpage

If you do want to know more about C++ features, how it is used, how applications are written, what are the limitations, etc., you better check out this guide. It also educates you on the fundamental blocks and standardization of C++.

Read: NASA’s 10 Coding Rules for Writing Safety Critical Program

2. Essential Core C++ Cheat Sheet

Format: Online Webpage and PDF

It provides an overview of important aspects of C++, and is aimed at existing C++ coders and object oriented developers looking to transition to C++.

1. C++ Data Structures and Algorithms

Format: Online Webpage

Read: 20 Most Useful Java Cheat Sheets For Developers

This GitHub page explains data structures (stack, queue, deque, heap), trees (binary, balanced, depth- and breadth-first search), NP complete problems, and algorithms like insertion sort, selection sort, merge sort, bubble sort and quicksort.