如果要调用转换结果,可以用sprintf()和sscanf()进行操作。...8进制存进y
sprintf(s,"%o", x);
sscanf(s, "%o", &y);
//得到y并进行相关操作。。...进制相互转换
cout << trans("351306", 8, 2) << "\n";
cout << trans("946351", 10, 2) << "\n";
cout...<< trans("a6b816", 16, 2) << "\n";
cout << "\n";
cout << trans("101111111001", 2, 8) << "\n...n";
cout << trans("a6b8c9def", 16, 8) << "\n";
cout << "\n";
cout << trans("10000001", 2,