The only way I know is:
#include <sstream>
#include <string.h>
using namespace std;
int main() {
int number=33;
stringstream strs;
strs << number;
string temp_str = strs.str();
char* char_type = (char*) temp_str.c_str();
}
But is there any method with less typing ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…