C/C++

ANSI-C and C++ coding tips

As easy as π: Algebraic Operations in C
There are cases when you do need to re-implement matrix-vector multiplication and other trivial operations. Such a case is when you're writing code for Arduino or some other low-level system. Here we provide some snippets to do perform basic algebraic operation in C.

Constructors for C structures
In this post we suggest ways to instantiate a structure using "constructor" functions ((ab)using the terminology of OO-programming).

C++: calling a constructor from within a constructor
A simple way to call a constructor from within the constructor in C++. Indeed, this is not possible, but there is a very nice workaround!

C++ Templates: Seperate definition and implementation 
C++ templates can give the developer quite some trouble when it comes to separating the implementation from the header. Here, we provide an example on how to work this limitation around with the neatest possible way.

No comments:

Post a Comment