C++ const char *转string 和 string 转const char *的一种方法
(认知有限,如有不妥,还请告知,欢迎讨论)
输出结果:

The type of "sample pkc" is PKc
The type of "sample str" is NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
The type of "beginning pkc" is PKc
The type of "beginning pkc" now is NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
The type of "beginning string" is NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
The type of "beginning string" now is PKc
=END=