[C++] Visual Studio Code 2019 WPILib error -- Resolved

Anyone having issue with WPILib libraries in the new Visual Studio Code IDE? I installed everything like it was instructed on this page (Using Windows): https://wpilib.screenstepslive.com/s/currentCS/m/cpp/l/1027500-installing-c-and-java-development-tools-for-frc

I created a basic template command program in c++ and it compiles fine. However when I tried to include the WPILib.h
e.g.
#include “frc/WPILib.h”

and create a simple Timer object
e.g.
Timer testTimer = new Timer();

I keep getting error: ‘Timer’ does not name a type

And this goes for the PIDController, Joystick, etc. as well.

For 2019, the using namespace frc; shim in C++ has been removed. This means your code either has to prefix all WPILib classes with frc::, e.g. frc::Timer instead of Timer (this is the recommended approach), or add using namespace frc; to your own source files/header files (not recommended).

Thanks! That was it, appreciate the tips!

What is the name for joystick then? It used to be “Joystick”, so now is it frc::Joystick?

Correct.

Ok, thank you.