Wrote a setCPU() function to take of setting properties on CPU

Currently not working! Unable to reference the
model.properties(mainclock)
This commit is contained in:
ganome 2025-01-28 15:51:35 -07:00
parent 2cfaa7b25e
commit 22f6da97f4
Signed by untrusted user who does not match committer: Ganome
GPG Key ID: 944DE53336D81B83
2 changed files with 12 additions and 0 deletions

9
include/setcpu.h Normal file
View File

@ -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;
}

View File

@ -2,6 +2,7 @@
#include <string> #include <string>
#include "lists/hardware.h" #include "lists/hardware.h"
#include "lists/cpu.h" #include "lists/cpu.h"
#include "include/setcpu.h"
int main() { int main() {
@ -14,6 +15,8 @@ int main() {
i75820k.model = "i75820k"; i75820k.model = "i75820k";
i75820k.manufacturer = "Intel"; i75820k.manufacturer = "Intel";
setCPU("i75820k", 3.2, 3.6);
cout << "The " << A7800x3d.model << "'s Manufacturer is: " << A7800x3d.manufacturer << endl; cout << "The " << A7800x3d.model << "'s Manufacturer is: " << A7800x3d.manufacturer << endl;
cout << "The Main Clock Speed is: " << A7800x3d.mainclock << endl; cout << "The Main Clock Speed is: " << A7800x3d.mainclock << endl;