程序运行时,长时间崩溃 thisLong = atoll(c); 这有什么原因吗?
string ConvertToBaseTen(long long base4) {
stringstream s;
s << base4;
string tempBase4;
s >> tempBase4;
s.clear();
string tempBase10;
long long total = 0;
for (signed int x = 0; x < tempBase4.length(); x++) {
const char* c = (const char*)tempBase4[x];
long long thisLong = atoll(c);
total += (pow(thisLong, x));
}
s << total;
s >> tempBase10;
return tempBase10;
}