Can someone please check my code?

gfvalvo:

  1. It has a main() function.
  2. It doesn't have setup() and loop() functions.

That makes sense. I didn't see that.

The OP mention of Visual Studio should have rang a bell.