In Visual Studio
C2513: no variable declared before ***
when such error occurs
The reason of the error is that you used a variables defined in other header
files.
Rename your variables.
For example, "near" and "far" is defined in WinDef.h, so, if you are including WinDef.h, you cannot use "near" and "far" for variables.