fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int testBelow255 = 0xfe;
  6. int test255 = 0xff;
  7. int test256 = 0x100;
  8. int testAbove255 = 0xa19;
  9. int test65535 = 0xffff;
  10. int test65536 = 0x10000;
  11. int testAbove65535 = 0xf01e99;
  12. return 0;
  13. }
  14.  
  15. string MainAssemblyUnit::outputToHexFormat(int value) {
  16. string output = "";
  17. while (value > 255) {
  18. //output.append(outputToHexFormat(value & 255));
  19. output = outputToHexFormat(value & 255) + output;
  20. value = value >> 8;
  21. }
  22. return output + outputToHexFormat(value & 255);
  23. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:15:8: error: 'MainAssemblyUnit' has not been declared
 string MainAssemblyUnit::outputToHexFormat(int value) {
        ^
stdout
Standard output is empty