I’m trying to convert an incoming sting of 1s and 0s from stdin into their respective binary values (where a string such as ‘11110111’ would be converted to 0xF7). This seems pretty trivial but I don’t want to reinvent the wheel so I’m wondering if there’s anything in the C/C++ standard libs that can already perform such an operation?
Share
For larger numbers, there as a
long longversion,strtoll.