70,038
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <string.h>
void test(char **line)
{
char *tmp = *line;
printf("tmp:%s\n", tmp);
printf("line:%s\n", *line);
}
int main()
{
char *tmp = "hello world";
test(&tmp);
}
#include <cstdio>
#include <cstring>
void test(char **line)
{
char *tmp = *line;
printf("tmp:%s\n", tmp);
printf("line:%s\n", *line);
}
int main()
{
char* tmp = "hello world";
test(&tmp);
return 0;
}
#include <stdio.h>
#include <string.h>
void test(char (*line)[12] )
{
char *tmp = *line;
printf("tmp:%s\n", tmp);
printf("line:%s\n", *line);
}
int main()
{
char tmp[] = "hello world";
test(&tmp);
}