新浪博客

2024年09月05日

2024-09-05 20:47阅读:
#include
#include
using namespace std;
void test(const char* const d) // or void test(char* d)
{
cout<<d<<endl;
}
int main ()
{
char s[]='hello';
test(+s); //数组前加+,转化为指针...
}

我的更多文章

下载客户端阅读体验更佳

APP专享