開始想在想把一個char變成string
但是沒有找到合適的方法,不過在網上看到其實它的解決方式
char ch = LastCode[4];// LastCode[4]表示一個字符數組中的一個字符
string lastChar;
lastChar.insert(lastChar.begin(), ch );
但是沒有找到合適的方法,不過在網上看到其實它的解決方式
char ch = LastCode[4];// LastCode[4]表示一個字符數組中的一個字符
string lastChar;
lastChar.insert(lastChar.begin(), ch );