[CODE]#include <iostream>
#include <sstream>
using namespace std;
int main(){
int input;
cin >> input;
ostringstream ostrm;
ostrm << input;
string str = ostrm.str();
string::iterator p = str.begin();
for (;p != str.end();++p)
cout << *p << (p+1 == str.end() ? "\n" : ",");
system("pause");
}[/CODE]
红色部分即为转换!
Fight to win or die...