diff --git a/lists/hardware.h b/lists/hardware.h index 141c1a6..cd2481e 100644 --- a/lists/hardware.h +++ b/lists/hardware.h @@ -12,7 +12,7 @@ class Hardware { class CPU: public Hardware { public: - bool Bit64; + bool bits64; int cores; int threads; int pcielanes; @@ -22,16 +22,30 @@ class CPU: public Hardware { std::string architecture; std::string memoryrange; - std::string getmanufacturer(std::string manufacturer){ - return manufacturer; + CPU() { + manufacturer = "Intel"; + model = "default"; + ReleasedYear = 2000; + bits64 = true; + cores = 4; + threads = 2; + pcielanes = 24; + maxram = 128; + mainclock = 2; + boostclock = 2.2; + architecture = "x86_64"; + memoryrange = "00:00"; + }; + + void getmanufacturer(std::string manufacturer){ + cout << manufacturer; }; }; -// std::string a7800x3d(std::string man){ - // CPU A7800x3d; - // A7800x3d.manufacturer = "AMD"; - // return man; -// }; +// Spawn a CPU class for the Ryzen 7 7800x3d +CPU A7800x3d; +// Spawn a CPU class for the Intel i7 5820k +CPU Ii75820k; // CPU A7800x3d; // A7800x3d.manufacturer = "AMD"; diff --git a/main.cpp b/main.cpp index b029205..d90ec1d 100644 --- a/main.cpp +++ b/main.cpp @@ -3,13 +3,13 @@ #include "lists/hardware.h" #include "lists/cpu.h" +/* void setupCPU(std::string model, float mainclock, int cores){ i75820k.model = model; i75820k.mainclock = mainclock; i75820k.cores = cores; }; -// - +*/ int main() { @@ -27,13 +27,14 @@ int main() { // a7800x3d(); // a7800x3d(4.8, 5.2); -setupCPU("i75820k", 3.2, 6); +/* setupCPU("i75820k", 3.2, 6); cout << "cores: " << i75820k.cores << endl; + cout << "manufacturer: " << i75820k.manufacturer << endl; +*/ - // cout << "Setting 7800x3d Manufacturer to AMD : " << a7800x3d("test") << endl; - // cout << "Setting the clock speeds to: Main: " << a7800x3d(4.8,5.2) << endl; - - // cout << "The Manufacturer is: " << A7800x3d.manufacturer << endl; + A7800x3d.manufacturer = "AMD"; + A7800x3d.model = "Ryzen 7 7800x3d"; + 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;