Reputation: 5
I am getting these errors when I run my code in Dev-C++ 4.9.9.2 and yes, I'm a beginner My program is a basic test program designed to give an int value on Left Shifts' Key Press.
In function int main()':
Do' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
;' before '{' token
'While' undeclared (first use this function)
;' before "on"
And here's my code:
using namespace std;
int main()
{
int on;
on = 1;
Do
{
GetASyncKeyState(VK_LSHIFT int key);
cout << key << endl;
}
While on = 1;
return 0;
}
Upvotes: 0
Views: 114
Reputation: 60027
Do/While should be do/while (i.e. lower case). It is a good idea to learn about/read the error and warning messages generated by the compiler.
Upvotes: 1