40 lines
773 B
C++
40 lines
773 B
C++
#pragma once
|
|
#include "hardware.h"
|
|
#include <fstream>
|
|
|
|
using namespace std;
|
|
string line;
|
|
string& line2 = line;
|
|
|
|
void genCPUclasses() {
|
|
fstream cpuList;
|
|
cpuList.open("lists/cpulist", ios::in);
|
|
|
|
if(cpuList.is_open()) {
|
|
cout << "File opened\n";
|
|
}
|
|
else { cout << "Failed to open file!" << endl; }
|
|
|
|
while (getline(cpuList, line)) {
|
|
// cout << line << endl;
|
|
line2 = line;
|
|
CPU *line = new CPU;
|
|
// BEGIN troubleshoot
|
|
line->HardwareSpecs["model"] = line2;
|
|
// cout << line->HardwareSpecs["model"] << endl;
|
|
cout << line2 << endl;
|
|
}
|
|
|
|
cpuList.close();
|
|
};
|
|
|
|
// CPU *A7800x3d = new CPU;
|
|
// CPU *Ii75820k = new CPU;
|
|
|
|
|
|
// std::string a7800x3d(std::string man){
|
|
// CPU A7800x3d;
|
|
// A7800x3d.manufacturer = "AMD";
|
|
// return man;
|
|
// };
|