---
# System prepended metadata

title: Programming style

---

# Programming style
## 列舉
```
#include <iostream>
using namespace std;
#define up 1
#define down 2
#define right 3
#define left 4

int main() {
  int a[3][3]={
    {1,1,1},
    {1,0,1},
    {1,1,1}
  };
enum point
{   
  HOLD=1,
  READY=2,
  RUNNING=3,
  WAITING=4,
  FINISHED=5
};
enum point student,teacher;
/*
用int可以看到地圖而defind enum就不行 但能夠看到方向
*/
}
```