if (data[i] != static_cast<unsignedchar>(file[i])) {
addrs.push_back(i);
values.push_back(file[i]);
}
}
if (!addrs.size()) {
std::cout << "The contents of the file you have chosen is identical to the EEPROM contents.\n" << "Press Enter to choose another file, Space to cancel. ";
while (true) {
int c = _getch();
if (c == 32) {
clear_screen();
return;
}
elseif (c == 13) {
break;
}
}
}
else {
print(reinterpret_cast<constunsignedchar*>(const_cast<char*>(file.c_str()))); // ugly but it works
break;
}
}
std::cout << "\nYou're about to overwrite the data in the EEPROM with the data above.\n"