The code compiles and runs fine, but I don’t like how the CurrentYaw, InitialYaw and TargetYaw variables remain white. They were declared as float variables in the header, just like in the video.
Every time I declare a variable in the cpp file, it gets color coded properly (see int testvariable), but it doesn’t seem to want to for the header.
They aren’t supposed to. The blue colour is for local variables. Member variables are a different colour (white in this case) to help differentiate between them and local ones.
If you really want to change it you can change colours via Tools > Options > Environment > Fonts & Colors.
C/C++ Fields = Member variables.
C/C++ Local Variables - …
C/C++ Variables = Global variables