string const char*

595 단어 자바C++c.netC#
http://topic.csdn.net/u/20080928/13/2ac392f7-df0e-4092-8350-1af408811ab7.html?seed=613843858&r=60418232#r_60418232


#include <iostream>
#include <string>
using namespace std;

int main()
{
    string str1="Hello";
    char *str2=const_cast<char*>(str1.c_str());
    cout<<str2;
    return 0;
}

좋은 웹페이지 즐겨찾기