Tag: C++ / MFC
Using boost::scoped_arrayWhen we want to dynamically allocate an array of objects for some purpose, the C++ programming language offers us the new and delete operators that are intended to replace …
A code snippet with which utilizes both template classes and STL to handle generic data types. In keeping with the spirit of this blog, I have kept the explanation to …
Right now I am just starting with a very simple example – no fancy stuff – just a single thread to demonstrate a sequence that updates a counter 20 times …
Some neat string formattingA pretty neat snippet found on stackoverflow some time ago (kudos David Rodriguez), that is worth repeating. Some time ago, a ‘moderator’ at StackOverflow removed this thread …
Here’s an example of how using objects (hat-tip: Paul Wolfensberger)
Using boost::scoped_arrayWhen we want to dynamically allocate an array of objects for some purpose, the C++ programming language offers us the new and delete operators that are intended to replace …
Just some simple examples posted here as a means of easy lookup…
I recently needed to revisit this to create simple monochrome bitmaps representing the sets of nozzles turned off/on on a Xaar microarrayer printhead. Sample code here. Essential steps are outlined …
Creating the byte arrayThis post describes a means of taking data in the form of raw pixels containing RGB values as well as the image height, width and the number …
Declaring and initializing multi-dimensional arrays in C++ can be done not just by way of traditional pointer arithmetic, but using the STL / Boost libraries as well. Here are some …