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:
parent
2cfaa7b25e
commit
22f6da97f4
9
include/setcpu.h
Normal file
9
include/setcpu.h
Normal 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;
|
||||
}
|
||||
3
main.cpp
3
main.cpp
@ -2,6 +2,7 @@
|
||||
#include <string>
|
||||
#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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user