In the directory where the program is located (C:\2022\Work\programming\engineering\my-works\my_game\programs), there is also the glew-2.1.0 folder, which contains the include folder, which contains the GL folder, which contains header file glew.h. When I try to run the program in Visual Studio Code 1.69 (Windows 10 Home), the following text appears in the terminal:
"PS C:\2022\Work\programming\engineering\my-works\my_game\programs> cd "c:\2022\Work\programming\engineering\my-works\my_game\programs\" ; if ($?) { g++ open_gl_1_test.cpp -o open_gl_1_test } ;if
($?) { .\open_gl_1_test }
open_gl_1_test.cpp:1:10: fatal error: GL/glew.h: No such file or directory
1 | #include <GL/glew.h>
| ^~~~~~~~~~~
compilation terminated.
PS C:\2022\Work\programming\engineering\my-works\my_game\programs>".
The first line of your first OpenGL practice generates a compile error :/
I guess that you have not installed and linked what it is required in order to compile an OpenGL code. You should take a look at a simple tutorial to install properly header files and librairies. I tested your code and it works as expected with the right settings, displaying a simple window with a red background. Take a look at these links :