diff --git a/include/setcpu.h b/include/setcpu.h new file mode 100644 index 0000000..f3e203c --- /dev/null +++ b/include/setcpu.h @@ -0,0 +1,9 @@ +void setCPU(){}; + +void setCPU(std::string model, float mainclock, float boostclock) { + mainclock = mainclock; + boostclock = boostclock; + // 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; +} diff --git a/main.cpp b/main.cpp index 85d9c8a..ed0b51a 100644 --- a/main.cpp +++ b/main.cpp @@ -2,6 +2,7 @@ #include #include "lists/hardware.h" #include "lists/cpu.h" +#include "include/setcpu.h" int main() { @@ -14,6 +15,8 @@ int main() { i75820k.model = "i75820k"; i75820k.manufacturer = "Intel"; + setCPU("i75820k", 3.2, 3.6); + cout << "The " << A7800x3d.model << "'s Manufacturer is: " << A7800x3d.manufacturer << endl; cout << "The Main Clock Speed is: " << A7800x3d.mainclock << endl;