![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二维数组
Billy12138
i am billy
展开
-
三子棋小游戏(新手必看)
头文件 game.h #ifndef __GAME_H__ #define __GAME_H__ #include #include #include #include #define ROWS 3 #define COLS 3 void init_board(char board[ROWS][COLS], int row, int col); void display_board(ch原创 2017-04-23 14:00:32 · 414 阅读 · 0 评论 -
【数据结构】简单迷宫:假设只有一个出口
#define _CRT_SECURE_NO_WARNINGS //这里的迷宫用二位数组表示,1表示能走通其他表示不能走通 #include #include using namespace std; struct Seat//储存坐标 { Seat(int x, int y) : _x(x), _y(y) {} int _x; int _y; }; #define ROW 10 #原创 2017-11-20 00:22:18 · 626 阅读 · 0 评论 -
【c语言】数组计算问题--数组的大小是多少
解释说明:每一条语句后面的就是测出来的运行结果,下面是原因解释: #include <stdio.h> int main() { int a[] = { 1, 2, 3, 4 }; printf("%d\n", sizeof(a));//16 //数组名放在sizeof里表示整个数组 printf("%d\n", sizeof(a + 0));//4...原创 2018-07-24 12:03:47 · 3408 阅读 · 0 评论