c语言 入门 但是却一堆错误 有没有大佬救我一下

#include<stdio.h>struct1{intseed;floatsongs;doublejudge;unsignedinthistory;unsignedin... #include <stdio.h>
struct 1
{
int seed;
float songs;
double judge;
unsigned int history;
unsigned int mitten;
float apparel;
unsigned int sleet;
char island;
double question;
double pot;
double haricut;
unsigned int boats;
float nerve;
int creator;
unsigned int grip;
char balloon;
double board;

};

struct 1 d=(-38, -0.004165, 1, 7066, 2, -0.000004, 1623919883598747, "porter", 0, 1, 0, 3084, 15626.715820, 59, 29, 'p', 1);

int main()
{
printf("seed, songs, judge, history, mitten, apparel, sleet, island, question, pot, haircut, boats, nerve, creator, grip, balloon, board \n");
printf("%d, %f, %f, %u, %u, %f, %u, %s, %f, %f, %f, %u, %f, %x, %o, %c, %f \n", d.seed, d.songs, d.judge, d.history, d.mitten, d.apparel, d.sleet, d.island, d.question, d.pot, d.haircut, d.boats, d.nerve, d.creator, d.grip, d.ballon, d.board);

return 0;

};

然后就是一堆错误
Compilation Failed

/usercode/file.cpp:3:8: error: expected identifier before numeric constant
struct 1
^
/usercode/file.cpp:3:8: error: expected unqualified-id before numeric constant
/usercode/file.cpp:25:8: error: expected identifier before numeric constant
struct 1 d=(-38, -0.004165, 1, 7066, 2, -0.000004, 1623919883598747, "porter", 0, 1, 0, 3084, 15626.715820, 59, 29, 'p', 1);
^
/usercode/file.cpp:25:8: error: expected unqualified-id before numeric constant
/usercode/file.cpp: In function ‘int main()’:
/usercode/file.cpp:30:89: error: ‘d’ was not declared in this scope
printf("%d, %f, %f, %u, %u, %f, %u, %s, %f, %f, %f, %u, %f, %x, %o, %c, %f \n", d.seed, d.songs, d.judge, d.history, d.mitten, d.apparel, d.sleet, d.island, d.question, d.pot, d.haircut, d.boats, d.nerve, d.creator, d.grip, d.ballon, d.board);
^
展开
 我来答
heptnaol
2018-08-10 · TA获得超过7268个赞
知道大有可为答主
回答量:7120
采纳率:78%
帮助的人:2290万
展开全部
1,struct 1不行,不能用数字开头命名,需要以字母,或者下划线开头都行。
比如 struct s
2,struct s d = {},用花括号,不能用圆括号
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式