This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| class DataPacket; | |
| class Observer; | |
| class Subject; | |
| /* DataPacket: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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. | |
| */ |