keyboard func not working
Hi to all,
I m beginer in openGL and I have this problem problem:
my compiler is giving me this eror:
--------------------Configuration: vezba 06 23 gl - Win32 Debug--------------------
Compiling...
vezba 06 23 gl.cpp
C:\MY DOCUMENTS\PROGRAMI C++\vezba 06 23 gl.cpp(44) : error C2018: unknown character ''0x60''
C:\MY DOCUMENTS\PROGRAMI C++\vezba 06 23 gl.cpp(44) : error C2001: newline in constant
C:\MY DOCUMENTS\PROGRAMI C++\vezba 06 23 gl.cpp(44) : error C2065: ''d'' : undeclared identifier
C:\MY DOCUMENTS\PROGRAMI C++\vezba 06 23 gl.cpp(44) : error C2143: syntax error : missing '':'' before ''constant''
...........................................
...........................................
Error executing cl.exe.
vezba 06 23 gl.obj - 23 error(s), 1 warning(s)
since the kode is from red book I think that my settings are
not right.As fo code here it is:
void keyboard (unsigned char key, int x, int y)
{
switch (key) {
case `d'':
day = (day + 10) % 360;
glutPostRedisplay();
break;
case `D'':
day = (day - 10) % 360;
glutPostRedisplay();
break;
case `y'':
...........................
............................
Please help me with this
Martin
Martin Miljkovic
Martin Miljkovic
quote:
Original post by maxmagnus
since the kode is from red book I think that my settings are
not right.As fo code here it is:
void keyboard (unsigned char key, int x, int y)
{
switch (key) {
case `d'':
day = (day + 10) % 360;
glutPostRedisplay();
break;
case `D'':
day = (day - 10) % 360;
glutPostRedisplay();
break;
case `y'':
...........................
............................
Please help me with this
Martin
it should read
case ''d'':
not
case `d'':
it''s a classical typo in programming books...
/Please excuse my bad spelling - My native language is binary not english
|Visit me
\Take my advice - I don''''t use it...
/Please excuse my bad spelling - My native language is binary not english|Visit meTake my advice - I don''t use it...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement