From 4d3bb677f58150605dacfe5b59aa95e8dfd35fbc Mon Sep 17 00:00:00 2001 From: ganome Date: Tue, 28 Jan 2025 19:34:30 -0700 Subject: [PATCH] Cleaner Template for using functions to set members of an array --- include/setcpu.h | 4 ---- main.cpp | 20 +------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/include/setcpu.h b/include/setcpu.h index 09e365c..21b346c 100644 --- a/include/setcpu.h +++ b/include/setcpu.h @@ -1,6 +1,5 @@ // void setCPU(){}; - void setCPU(CPU *pCPU, float mmainclock) { cout << "Coming from the setCPU function in setcpu.h" << endl; @@ -11,6 +10,3 @@ cout << "Incoming main clock variable was: " << mmainclock << endl; } -//void setCPU(CPU *mA7800x3d, double mmainclock) { -//mA7800x3d->mainclock = mmainclock; -//} diff --git a/main.cpp b/main.cpp index 043aa80..a485df9 100644 --- a/main.cpp +++ b/main.cpp @@ -18,7 +18,7 @@ int main() { cout << "A7800x3d manufacturer is: " << A7800x3d->manufacturer << endl; cout << "A7800x3d pointer after the change to AMD is: " << &A7800x3d->manufacturer << endl; */ - A7800x3d->manufacturer = "AMD"; + // A7800x3d->manufacturer = "AMD"; // Cat out both CPU's that have been created for sanity cout << "IIi75820k manufacturer is: " << Ii75820k->manufacturer << endl; @@ -30,24 +30,6 @@ int main() { setCPU(A7800x3d, 4.8); cout << "A7800x3d new main clock speed is: " << A7800x3d->mainclock << endl; - // Set some variables for the spawned CPU's - // A7800x3d.manufacturer = "AMD"; - // A7800x3d.model = "Ryzen 7 7800x3d"; - - // i75820k.model = "i75820k"; - // i75820k.manufacturer = "Intel"; - - // setCPU("A7800x3d", 4.8, 5.2); - // setCPU("i75820k", 3.2, 3.8); - // setCPU(A7800x3d, 4.8); - -/* - cout << "The " << A7800x3d.model << "'s Manufacturer is: " << A7800x3d.manufacturer << endl; - cout << "The Main Clock Speed is: " << A7800x3d.mainclock << endl; - cout << "The Boost Clock Speed is: " << A7800x3d.boostclock << endl; - cout << "\n\nThe pointer is: " << ptr << endl; - // cout << "The pointer is: " << *ptr.manufacturer << endl; -*/ system("sleep 3s"); return 0; }