diff --git a/include/setcpu.h b/include/setcpu.h index f3e203c..277665d 100644 --- a/include/setcpu.h +++ b/include/setcpu.h @@ -1,9 +1,18 @@ void setCPU(){}; -void setCPU(std::string model, float mainclock, float boostclock) { - mainclock = mainclock; - boostclock = boostclock; + +void setCPU(std::string mmodel, float mmainclock, float mboostclock) { + A7800x3d.mainclock = mmainclock; + A7800x3d.boostclock = mboostclock; // model.boostclock = boostclock; // This doesnt work because its not a vaild reference! // Trying to use the local model var to call the global CPU class for that specific model - cout << "\n\n\n" << model << ".mainclock\n\n" << endl; + cout << "Coming from the setCPU function in setcpu.h" << endl; + cout << "\n\n\n" << mmodel << ".mainclock\n\n" << endl; + cout << "\n\n" << i75820k.boostclock << "\n\n" << endl; + cout << "Leaving setCPU()\n\n"; } + + +//void setCPU(CPU *mA7800x3d, double mmainclock) { +//mA7800x3d->mainclock = mmainclock; +//} diff --git a/lists/cpu.h b/lists/cpu.h index f30cbf0..2d669f7 100644 --- a/lists/cpu.h +++ b/lists/cpu.h @@ -21,8 +21,8 @@ void a7800x3d(float mainclock, float boostclock){ // return mainclock, boostclock; }; -std::string a7800x3d(std::string man){ - CPU A7800x3d; - A7800x3d.manufacturer = "AMD"; - return man; -}; +// std::string a7800x3d(std::string man){ + // CPU A7800x3d; + // A7800x3d.manufacturer = "AMD"; + // return man; +// }; diff --git a/lists/hardware.h b/lists/hardware.h index cd2481e..969e5fd 100644 --- a/lists/hardware.h +++ b/lists/hardware.h @@ -47,9 +47,3 @@ CPU A7800x3d; // Spawn a CPU class for the Intel i7 5820k CPU Ii75820k; -// CPU A7800x3d; -// A7800x3d.manufacturer = "AMD"; -// A7800x3d.ReleasedYear = 2024; -// A7800x3d.architecture = "Zen 4"; -// A7800x3d.boostclock = 5.2; -// A7800x3d.mainclock = 4.8; diff --git a/main.cpp b/main.cpp index ed0b51a..aad0bd3 100644 --- a/main.cpp +++ b/main.cpp @@ -4,6 +4,8 @@ #include "lists/cpu.h" #include "include/setcpu.h" +void* ptr = &A7800x3d; + int main() { using namespace std; @@ -15,12 +17,16 @@ int main() { i75820k.model = "i75820k"; i75820k.manufacturer = "Intel"; - setCPU("i75820k", 3.2, 3.6); + 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;