What is the "device"? What are the other parts on the board? (pig parts)i want to make a completely new board for the device or modify it , if i can.
You're making a VAST assumption that the code (assuming it is code at all?) was written using a C compiler, there's little reason to assume that - as we've no idea what the device does, what processor it may use (assuming it uses a processor at all?), or what era it might be from (except it's going to be old, using an EPROM).If it's text, then specifically unsigned char would be surprising. You could still use the std::stoi method I showed, but you have to cast to char* or otherwise construct a std::string from the text.