OT: Processor register size



Does anyone know of a reliable way of obtaining the register size of a
processor? I built a GUI that saves/loads binary data and I'm contemplating
the option of making it portable to other architectures (currently intel 32
bit). My first idea is simply to use something like this although I don't
know if this is reliable and/or sloppy:

typedef unsigned char byte;
byte word[sizeof(float)];

Thanks!

MQ




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]