文号
t78668
阅读
5623
回复
2
收藏
3
关于C二维结构体数组赋值与调用的问题
2016/01/24
IP:美国
尝试写了测试,但是不知道能不能得到值
.h

struct cood{
bool En;
int X;
int Y;
long angle;
long length;
};
struct LiLa{
double LA;
double LI;
};
struct Black{
struct cood Way1;
struct cood Way2;
struct cood Way3;
struct cood Way4;
struct LiLa My;
};
struct Black MAP[10][10];
void getdata(void);
.c
[b]
void getdata(void){
struct cood buff;
int i,j;
for(i=0;i>=10;i++){
for(j=0;j>=10;j++){
buff=MAP[i][j].way1;
printf("%d/n",buff.X);
}
}
}
不知道为什么除了打字其他功能都用不了[/b]
10年11个月前IP:陕西
805548
1楼
全局变量定义能放到头文件里?
引用
评论
10年9个月前IP:北京
813757
2楼
头文件里不要放定义,只能放声明,要不坑死使用者
引用
评论
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的