1. 程式人生 > >C++實現ASCII值轉十進位制的子函式

C++實現ASCII值轉十進位制的子函式

//將ASCII值轉化為十進位制數值
unsigned int result(unsigned int x)
{
unsigned int result=0;
if(x>=65)
{
result = x-65+10;
}
else
{
result = x-48;
}
return result;
}