A brief and hopefully to the point on getting up and running with OpenGL in an Ubuntu Linux environment. For setting up OpenGL in Windows / Visual Studio environments, please see this post. My choice of integrated development environment for C++ development for this example is Netbeans 7.3. Continue reading
Listing1: Serialization of STL containers: a
std::vector example using text archives
Your intuition may tell you to iterate through the STL container in order to serialize it, but it’s actually a lot simpler. First of all, be sure to include the necessary
vector.hpp include file:
1. Download and extract the SWiG interface:
Windows version available here:
A utility in C# to use public/private key encryption of data inside large text files, before sending them over a secure connection such as SSL. Symmetric encryption, whereby both recipient and sender (or client and server) know the key with which to encrypt and decrypt messages was out of the question due to it’s inherent that use this key.
A static library is simply a file that contains functionality that can be made available to other programs. Static libraries end with the .lib extension and are made available to other Visual Studio projects (console applications, MFC applications etc) by creating links to them. Please follow the steps described below in order to create and use your own static libraries.
There are plenty of resources on how we may recursively search and print the contents of binary trees. This example shows how to (recursively) make use of the Boost serialization libraries and streams in order to print the contents of a tree-like data structure.
A number of Windows-based Boost libraries are not “header-only” and require that you must get them compiled. One way is to compile them yourself. A possibly easier way is to do this via the prebuilt installer packages from BoostPro.
Say for example you wish to use the Boost serialize facilities in your program:
These instructions, also available on the Microsoft site, show how to create from scratch a Visual Studio 2010 project that can utilize dll routines created elsewhere, by way of referencing. It basically says the same thing, but with additional screenshots to make it more intuitive.
For another example posts on functors (function objects) see here. A functor is an instance of a C++ class that has the
operator() defined. One big advantage of functors is that when you define the
operator() in C++ classes you not only get objects that can act like functions, but can also store state as well.
Some code samples I have collated in the sample below, that demonstrate how
boost::function can be assigned with functors, ordinary functions, class member functions and overloaded class member functions respectively.