如何在char指针(c ++)中打印数据?

SPB*_*SPB 4 c++

我有一个

function(const char * data)
{
//how to print the data which is inside the data
}
Run Code Online (Sandbox Code Playgroud)

当我调试时,我只看到地址.如果我打印(*数据)则不打印任何内容.

任何的想法?

And*_*son 8

#include <iostream>

void function(const char * data)
{
    std::cout << data;
}
Run Code Online (Sandbox Code Playgroud)