คำถามติดแท็ก const-char

10
วิธีการแปลงจาก int เป็นถ่าน *
วิธีเดียวที่ฉันรู้คือ: #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(); } แต่มีวิธีใดบ้างที่พิมพ์น้อยลง?
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.