hardwaredb/lists/cpu.h.help

20 lines
495 B
Plaintext
Raw Normal View History

std::vector<CPU> genCPUclasses() {
std::vector<CPU> resultCpuList;
std::ifstream cpuList{"lists/cpulist", std::ifstream::in};
if(cpuList.is_open()) {
std::cout << "File opened\n";
}
else { std::cout << "Failed to open file!\n"; }
while (std::getline(cpuList, line)) {
CPU cpu;
cpu.HardwareSpecs["model"] = line;
resultCpuList.push_back(std::move(cpu));
// cout << cpu.HardwareSpecs["model"] << '\n';
cout << line << endl;
}
return resultCpuList;
}