小编Zac*_*low的帖子

编译代码时出错

我在编译此代码时收到此错误字符串未声明.

#include <stdio.h>
#include <stdlib.h>


int main()
{
string names;
printf("What is your name?\n");
scanf("%s", &names);

printf("Your name is %s", names);
return 0;
}
Run Code Online (Sandbox Code Playgroud)

有人可以告诉我为什么.非常感谢

c++ printf declaration

3
推荐指数
1
解决办法
70
查看次数

标签 统计

c++ ×1

declaration ×1

printf ×1