how would i write a function that parses a hex number as a string into a decimal integer. I have the following done i just need help finishing it. any help will be appreciated
#include <iostream>
#include <string>
using namespace std;
int parseHex(const string &hexString)
int main()
{
cout << "Enter a hex number: ";
string hexString;
cin >> hexString;
cout <<"The number in decimal is"
<< parseHex(hexString) << endl;
return 0;
}
int parseHex(const string &hexString)
{
int value = hexString[0]