Nvidia OpenGL

Can anyone provide a quick guide on how to set up OpenGL for using Nvidia GPUs?

I have looked at the following website: OpenGL | NVIDIA Developer. It seems that I have to install a particular driver to use OpenGL 4.6. The driver (462.31) is older in version than the driver that came with my CUDA installation. I am not sure if I really need to replace my current driver with the older version to use OpenGL. I am also concerned if my CUDA use will be influenced by installing an older driver. Anyway, I installed driver 462.31 as it is the official driver for using OpenGL 4.6.

In my understanding, the OpenGL API should be available after driver installation. Then I need a header file for declaration of utilities. The following page led me to some header files: NVIDIA OpenGL Specs | NVIDIA Developer. On top of the page there are three header files: glext.h, glxext.h and wglext.h. I assumed including these three header files in my code should give me access to OpenGL utilities. However, as I complied following code,

using namespace std;

#include "glext.h"
#include "glxext.h"
#include "wglext.h"

int main()


I got the following error message: cannot open include file: ‘KHR/khrplatform.h’: no such file or directory. This error is from the following inclusion in glext.h: #include <KHR/khrplatform.h>.

Can someone tell me where I am doing improperly, and how to use OpenGL with Nvidia GPUs? Thanks.