Tag: pattern
3 posts
-
C++ Regular Expression Basics: std::regex Matching, Capture Groups and Tokenizing
A beginner-focused introduction to std::regex: the regex_match vs regex_search mistake almost everyone makes first, how capture groups are indexed, and the raw-string habit that avoids double-escaping bugs.
-
The Decorator Pattern in C++: Adding Behavior by Composition (Streams, Logging, Formatters)
The Decorator pattern in C++: adding behavior at runtime through composition instead of inheritance, with stream decorators, a logging system, and a text formatter example.
-
The Command Pattern in C++: Undo/Redo, Macros, Transactions and When It Is Overkill
The Command pattern in C++: turning requests into objects for undo/redo, macros, transactions, queues, and GUI or game input, plus when the pattern is overkill.