Obsolete Project

Controlled Vars

To Never Forget Initializing Your C++ Variables

Controlled VariablesThe controlled_vars.h and other header files are C++ templates, that gives you the ability to control the initialization of your basic C types (i.e. char, int, long long, etc.)

Especially, it allows you to avoid forgetting the initialization of variable members since these variables cannot be initialized where declared1. Classes are here to help you and they do a great job at this, even for basic types such as char, int, and long variables. Really! My main C++ bugs came from forgetting the initialization of variable members and this is the reason why I created these headers.

Controlled Variables can actually be used anywhere you declare a basic type variable without immediately initializing it (and limited controlled variables anywhere a bounded value is used.)

  • 1. I see you coming here... Yes you can initialize variable members, but I declare my variables in my header file (.h) and I then go to my constructor in the code file (.cpp). Guess what... when I first create the class, I think about it. When I update the class later, I forget because I'm working on a function that is not the constructor. Not only that, if my class has three constructors, I'm not unlikely to think of adding the variable to one of them and not the other two! Frankly, this happens to everyone... Using this header is a life saver. Many countless hours of debugging time can be saved just by consistently using Controlled Variables.


A C++ library to access Cassandra servers

libQtCassandra LogoThe libQtCassandra library is an advanced C++ library used to access Cassandra servers in C++.

Contrary to the basic Cassadra server interface, this C++ library brings you separate objects that handle each level of the server data, i.e. the cluster, contexts, table, rows, cells.

Details for developers can be found on the reference pages (a 100% complete Doxygen documentation of the library including source code and working examples.)

Syndicate content Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly