[ create a new paste ] login | about

Link: http://codepad.org/y3BxuGrK    [ raw code | output | fork ]

C++, pasted on Jun 23:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
std::string mystr = "12345";
char val = 'A';
unsigned int myval;
std::stringstream ss;
ss << val;
ss >> std::hex >> myval;
cout << myval << endl;
}


Output:
1
10


Create a new paste based on this one


Comments: