EXT Library - print

The lib::print is a type-safe alternative to std::printf function.


The lib::print is set of overloaded function templates. Each parameters is converted to string using the ext::echo then concatenated (without any separators) and written out to standard output. The standard output is usually a console but it may be redirected.

The syntax is similar to write function found in pascal programming language and its descendants.

You will need to include "ext/lib_bits/print.cpp" into your project in order to use lib::print.


#include <ext/lib>

int main () {
    lib::print (2, '/', 3, " equals ", 2.0/3.0);

    return 0;


Note that wide characters and wide-character strings are converted to char strings.

The lib::print functions are overloaded for up to 15 parameters now, but this number can be easily extended if that is found neccessary.

There is a separate implementation for Windows operating systems.