C++ c str을 string으로 변환

1 개요[ | ]

C++ c str을 string으로 변환
C++ C문자열을 string으로 변환
C++ const char*를 string으로 변환
#include <iostream>
using namespace std;
int main() {
    const char* charArray = "hello";
    string s(charArray);
    cout << s;
}

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}