Answers for "convert hexadecimal string to decimal cpp"

C++
2

string hex to int c++

//C++11
std::string s = "0xfffefffe";
unsigned int x = std::stoul(s, nullptr, 16);
Posted by: Guest on April-18-2021
1

Convert a hexadecimal number into decimal c++

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    int x;
    cin >>hex >> x;
    cout << x << endl;
    return 0;
}
Posted by: Guest on March-27-2021

Code answers related to "convert hexadecimal string to decimal cpp"

Browse Popular Code Answers by Language