fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. string test = "C0D2F9F5F4F6F0CF0BD289998388859599899587";
  8. int subPos = 2;
  9. cout << "Length [" << strtol(test.substr(subPos, 2).c_str(), NULL, 16) * 2 << "]" << endl;
  10.  
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
Length [420]