TGMDev

TGMDev C++ Programming

Browse practical C++ programming articles, development notes, source-code examples and demonstration projects.

This page is under continuous construction. New papers will be added depending on time available to write the papers and readers interest. So, feel free to ask for new ones !!!

Programming Environment

The development environment is the following:

  • OS: Windows 11 (Windows 10 is also used to check compliance of code, classes and namespaces presented in the papers with this previous version of Windows)
  • IDE: Visual Studio Community 2026
  • Framework: always MFC (Microsoft Foundation Classes)
  • Platform Toolset: always the lastest one (v145 on november 2025)
  • C++ Language Standard: ISO C++20 Standard (/std:c++20) or even Preview - ISO C++23 Standard (/std:c++23preview)
  • STL: Used whenever possible
  • Character Set: always Unicode Character Set
  • MFC framework: use of MFC in Static Library
C++ Programming

A One-liner DebugPublished Feb. 21, 2025

Artistic view of DebugTrace
The DebugTrace namespace is a very simple namespace that handles all the little details that make debugging easier and more powerful, while requiring significantly less typing. It includes measuring process duration and executing debugging functions.
View details
DebugTrace output

Dancing Links SolverPublished Mar. 24, 2025

Artistic view of DLX Solver
The application efficiently solves Sudoku grids using the Dancing Links algorithm introduced by Donald Knuth and displays the progress of the solving algorithm. The C++ source code utilizes the STL library and is freely available.
View details
DLX Solver Main Window

Sharing ClassesPublished Nov. 23, 2025

Artistic view of Sharing Classes
This article describes the best approach for sharing code across different projects. This technique is very simple to implement and helps avoid the duplication of software tools and code used by each programmer.
View details
Sharing Classes Demo Window

A Named-Color LookupPublished Mar. 06, 202

Artistic view of Named Colors Lookup
The demo presents a solution to get the closest named color of a given color. It relies on an extended X11-style palette compiled from existing lists, conversion from sRGB to CIELAB and a nearest-neighbor search based on the ΔE00 metric (source code available).
View details
Named Colors Lookup Demo Window