Added function pointer for indented display

This commit is contained in:
Tuhin Mondal 2024-06-17 22:21:11 -07:00
parent c6243e2314
commit 67771502ef

6
CPU.h
View File

@ -57,7 +57,11 @@ public:
// Friend function declarations
friend void display(const CPU &cpu);
friend void iDisplay(const CPU &cpu, int level);
friend void iDisplay(const CPU& cpu, int level) {
for (int i = 1; i < level; i++)
std::cout << "..";
std::cout << level << "). " << cpu.cpuId << std::endl;
};
friend std::ostream &operator<<(std::ostream &os, const CPU &cpu);