This page contains basic beginner and more advanced C and C++ snippets. The purpose of this page is two fold; a reference for those who are learning (and like to learn via pure code), as well as, a location for mpettersson to keep snippets and C/C++ related links. This pages subsections are:
C/C++ 101
Miscellaneous C/C++ Classes & Code
C/C++ Resources
As always, please contact us with comments, concerns, questions, etc. about C/C++!

C/C++ 101

If you’re using a Mac or other Unix based machine, you’re probably good. For C/C++ on Windows you have several C compiler and C++ compiler options… In case you were wondering, yes, Eclipse and NetBeans have support for C/C++.

C Keywords
auto break case char const continue
default do double else enum extern
float for goto if int long
register return short signed sizeof static
struct switch typedef union unsigned void
volatile while


C++14 Keywords
alignas alignof asm auto bool break
case catch char char16_t char32_t class
const constexpr const_cast continue decltype default
delete do double dynamic_cast else enum
explicit export extern false float for
friend goto if inline int long
mutable namespace new noexcept nullptr operator
private protected public register reinterpret_cast return
short signed sizeof static static_assert static_cast
struct switch template this thread_local throw
true try typedef typeid typename union
unsigned using virtual void volatile wchar_t


C/C++ Syntax

The following is basic C and C++ syntax.



TODO – There will be pointer hints/tips here.

Miscellaneous C/C++ Code

This section will contain a mix of interesting, helpful, and otherwise slightly more advanced snippets.


C and C++ Resources

10 Major Differences Between C and C++

Leave a Reply