I get a very weird error in my code. I created this class in C++:
class Tester{
float f;
Tester(float,float);
};
and i implemented it like this:
Tester::Tester(float near,float a){
this->f=near/a;
}
i get the following error:
..\src\Tester.cpp: In constructor 'Tester::Tester(float, float)':
..\src\Tester.cpp:4:14: error: expected primary-expression before '/' token
this->f=near/a;
^
when i rename near
to something else the error disappears. thats not a big deal of course because i can rename the variable, but i was just curious if someone of you knows the reason.
Update:
The reason is the inlusion of windef.h
. it was included by windows.h
via wglext.h
.