Skip to content

Instantly share code, notes, and snippets.

View terablade2001's full-sized avatar
:octocat:
Trying something new (as always!) ...

terablade2001 terablade2001

:octocat:
Trying something new (as always!) ...
View GitHub Profile
@terablade2001
terablade2001 / Example_Observer_Pattern_Test.cpp
Created November 19, 2016 10:55
Testing a C++ Observer Pattern with Machines ControlRooms and DataPackets...
#include <iostream>
#include <vector>
using namespace std;
class DataPacket;
class Observer;
class Subject;
/* DataPacket:
@terablade2001
terablade2001 / Example_Call_Child_Method_From_Vector_Parent.cpp
Last active November 1, 2021 18:19
C++ call child's method from a vector of parents plus Using a common external function on children data.
#include <iostream>
#include <vector>
using namespace std;
/* Objectives:
1. Snippet showing how to use children's methods from a vector of parents.
2. Snippet also showing how to call a common non-class (but template'd) function in C++, from different classes, which will modify common variables and methods of those classes.
*/