[Iwao@fedora C62]$ cd ../../C7//C711/
[Iwao@fedora C711]$ ls
c711.cpp
[Iwao@fedora C711]$ g++ c711.cpp -lglut -lGL
c711.cpp:1:10: 致命的エラー: stdio: No such file or directory
    1 | #include <stdio>
      |          ^~~~~~~
コンパイルを停止しました。
[Iwao@fedora C711]$ g++ c711.cpp -lglut -lGL
[Iwao@fedora C711]$ ./a.out
[Iwao@fedora C711]$ g++ c711.cpp -lglut -lGL
c711.cpp: 関数 ‘void mouse(int, int, int, int)’ 内:
c711.cpp:43:10: エラー: expected ‘:’ before ‘;’ token
   43 |   default ;           break ;
      |          ^~
      |          :
[Iwao@fedora C711]$ g++ c711.cpp -lglut -lGL
[Iwao@fedora C711]$ ./a.out
left button is down  at ( 286 , 57 )
left button is up  at ( 286 , 57 )
right button is down  at ( 179 , 81 )
right button is up  at ( 179 , 81 )
middle button is down  at ( 179 , 81 )
middle button is up  at ( 179 , 81 )
[Iwao@fedora C711]$ g++ c711.cpp -lglut -lGL
[Iwao@fedora C711]$ ./a.out
left   button is down  at ( 116 , 36 )
left   button is up    at ( 116 , 36 )
middle button is down  at ( 160 , 46 )
middle button is up    at ( 160 , 46 )
right  button is down  at ( 160 , 46 )
right  button is up    at ( 160 , 46 )
マウスボタンをクリックする glutMouseFunc

[Iwao@fedora C711]$ cd ../C712
[Iwao@fedora C712]$ g++ c712.cpp -lglut -lGL
c712.cpp: 関数 ‘void mouse(int, int, int, int)’ 内:
c712.cpp:22:8: エラー: ‘stat’ was not declared in this scope; did you mean ‘state’?
   22 |    if (stat == GLUT_UP) {
      |        ^~~~
      |        state
c712.cpp:32:11: エラー: expected ‘;’ before ‘}’ token
   32 |     y0 = y
      |           ^
      |           ;
   33 |     }
      |     ~      
[Iwao@fedora C712]$ g++ c712.cpp -lglut -lGL
[Iwao@fedora C712]$ ./a.out


マウスボタンをクリックする 配列に格納