17 lines
446 B
C++
17 lines
446 B
C++
|
/*************************************************************************
|
||
|
> File Name : test_char2string.cpp
|
||
|
> Author : TL Song
|
||
|
> EMail : songtianlun@frytea.com
|
||
|
> Created Time : Tue 04 Aug 2020 05:19:13 AM CST
|
||
|
************************************************************************/
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
std::string string;
|
||
|
char ch[128] = "Test";
|
||
|
string = (std::string)ch;
|
||
|
std::cout << string << std::endl;
|
||
|
}
|