先给出通过字符型指针输出字符串的示例代码,如下:
#includeusing std::cout; using std::endl; int main() { const char *pszStr = "this is a string"; // 输出字符串 cout