📄 subject_27248.htm
字号:
<p>
序号:27248 发表者:苍蝇—fly 发表日期:2003-01-09 18:00:32
<br>主题:关于3维数组的问题???????
<br>内容:#include<iostream.h><BR>void main()<BR>{<BR> int array[12][5][7];<BR> for(int month=1;month<=12;month++)<BR> {<BR> for(int y=1;y<=5;y++)<BR> {<BR> for(int x=1;x<=7;x++)<BR> {<BR> array[month][x][y]=0;<BR> }<BR> }<BR> }<BR> for(int k=1;k<=12;k++)<BR> {<BR> for(int j=1;j<=5;j++)<BR> {<BR> for(int i=1;i<=7;i++)<BR> {<BR> cout<<array[k][i][j];<BR> }<BR> cout<<endl;<BR> }<BR> cout<<endl;<BR> }<BR> cout<<endl;<BR>}<BR><BR>错在哪里????????<BR> <BR>
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:晚风也渡 回复日期:2003-01-09 18:15:24
<br>内容:你写错了吧?<BR> for(int y=1;y<=5;y++)<BR> {<BR> for(int x=1;x<=7;x++)<BR> {<BR> array[month][x][y]=0;<BR> }<BR> }<BR>x应该在0和4之间!!<BR>再说,你的数组的下标应该从0开始!你再仔细看看你的程序!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -