Wiki - README‎ > ‎Programming‎ > ‎

C/C++

How to C (as of 2016) [link]

When CLion met biicode [link]

What a c programmer should know about memory [link]

awesome c frameworks, libraries, resources, and other shiny things [link]

five algorithms to know [link]

iod for a fast type-safe json-like domain specification language [link]

CS Reading Book List [link]

chaiscript [link]

poco c++ library [link]
compression, network, crypto, data, filesystem, logging, multithread

eric niebler [link]

simplelogger [link]

isaac - cryptographically secure pseudo-random number generator [link]

obscure c++ features [link]

implement a variant type from scratch [link]

rawline [link] - a small line editing library

common pitfalls [link]

open multi-methods [link]

cereal serializer for c++11 [link]

designated initialization with compound literals [link]
struct point { int x, y; };
struct point p = { .x = 1, .y = 3 };
afunc( (struct point) { .y = 1, .x = 5 } );

units [link]

ydiff [link]

c++11 cheat sheet [link] [link]

getting function caller information [link]

useful gcc macros [link]

print out all defined macros set by compiler [link]
$ clang -dM -E -x c /dev/null
$ gcc -dM -E -x c /dev/null

c++11 faq [link]

g++-4.7 for ubuntu 12.04 [link]
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.7 c++-4.7


user defined literals [link]

creating call graphs using egpyt [link] (requires graphviz).  converting to .pdf reqs imagemagick
$ gcc -fdump-rtl-expand file.c
$ egypt file.c.00.expand | dot -Gsize=100,100 -Grankdir=LR -Tps -o graph.ps
$ convert graph.ps graph.pdf

iterate over enum [link]
enum an_enum { zero, one, two };

// note: this is prefix op overload
an_enum& operator++( an_enum& x ) {
    x = static_cast< an_enum >( x + 1 );
    return x;

// ....

for( an_enum i = zero; i != two; ++i ) { 
    // ...
}

operation precedence (link)
Operator Description Associativity
() Parentheses (function call) (see Note 1) left-to-right
[] Brackets (array subscript)
. Member selection via object name
-> Member selection via pointer
++  -- Postfix increment/decrement (see Note 2)

++  -- Prefix increment/decrement right-to-left
+  - Unary plus/minus
!  ~ Logical negation/bitwise complement
(type) Cast (change type)
* Dereference
& Address
sizeof   Determine size in bytes

*  /  % Multiplication/division/modulus left-to-right

+  - Addition/subtraction left-to-right

<<  >> Bitwise shift left, Bitwise shift right left-to-right

<  <= Relational less than/less than or equal to left-to-right
>  >= Relational greater than/greater than or equal to

==  != Relational is equal to/is not equal to left-to-right

& Bitwise AND left-to-right

^ Bitwise exclusive OR left-to-right

| Bitwise inclusive OR left-to-right

&& Logical AND left-to-right

|| Logical OR left-to-right

?: Ternary conditional right-to-left

= Assignment right-to-left
+=  -= Addition/subtraction assignment
*=  /= Multiplication/division assignment
%=  &= Modulus/bitwise AND assignment
^=  |= Bitwise exclusive/inclusive OR assignment
<<=  >>= Bitwise shift left/right assignment

, Comma (separate expressions) left-to-right
Comments