C++编程的许多实例讲解 例如贪吃蛇的一段代码: //设置背景 void setBG(int length, int width){ HANDLE hOut; COORD OutChar; OutChar.X = 10; OutChar.Y = 10; int i = 0; int j = 0; for(i = 0; i < width; i++){ for(j = 0; j < length; j++){ bg[i][j].x = i; bg[i][j].y = j; bg[i][j].blocked = false; bg[i][j].f