CUDA/OpenGL Interop setup not working

So in the following code I am trying to setup OpenGL/Cuda interop. The code renders a proper triangle in a non-CUDA C++ project however I am not getting any thing if I am running it in a CUDA project with the cuda calls. I read nVidia’s developer guide on interop but the few CUDA calls that were originally missing did not solve the problem.

I based the setup on the following project:

Here is my code:

Edit: I did some error checking with cudaGetError,
these lines are causing an unknown error:
Commenting them results in no error from cuda side.
I’m now thinking that I have no clue how the VBOs and VAOs work with CUDA/OpenGL.

I fixed the problem, all I had to do was use glVertexPointer() instead of glVertexAttribPointer().
Edit: sorry I had to redact some stuff I said.