rsheytoonak
سه شنبه 13 اردیبهشت 1390, 12:36 عصر
سلام من این کد رو که تو vc++6 اجرا میکنم این خطا رو میده
fatal error C1010: unexpected end of file while looking for precompiled header directive
//#include "stdafx.h"
#include<windows.h>
#include<gl/glut.h>
int rotation=0;
void disp()
{
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glRotatef(rotation,0,0,1);
glColor3f(0,0,0);
glBegin(GL_LINES);
glVertex2f(0,-0,1);
glVertex2f(0,0,6);
glEnd();
glFinish();
}
void keyb(ansigned char k , int x, int y)
{
if (k=='r')
{
rotation=(rotation+5)%360;
disp();
}
}
void main(int argc, char** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
glutInitWindowSize(500,500);
glutInitWindowPosition(50,100);
glutCreateWindow("Hello");
glClearColor(1,1,1,0);
glShadeModel(GL_FLAT);
glutDisplayFunc(disp);
glutKeyboardFunc(keyb);
glutMainLoop();
}
نمیدونم مشکل از سیستمم هست یا کدنویسی کسی میتونه راهنماییم کنه؟
fatal error C1010: unexpected end of file while looking for precompiled header directive
//#include "stdafx.h"
#include<windows.h>
#include<gl/glut.h>
int rotation=0;
void disp()
{
glClear(GL_COLOR_BUFFER_BIT);
glLoadIdentity();
glRotatef(rotation,0,0,1);
glColor3f(0,0,0);
glBegin(GL_LINES);
glVertex2f(0,-0,1);
glVertex2f(0,0,6);
glEnd();
glFinish();
}
void keyb(ansigned char k , int x, int y)
{
if (k=='r')
{
rotation=(rotation+5)%360;
disp();
}
}
void main(int argc, char** argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
glutInitWindowSize(500,500);
glutInitWindowPosition(50,100);
glutCreateWindow("Hello");
glClearColor(1,1,1,0);
glShadeModel(GL_FLAT);
glutDisplayFunc(disp);
glutKeyboardFunc(keyb);
glutMainLoop();
}
نمیدونم مشکل از سیستمم هست یا کدنویسی کسی میتونه راهنماییم کنه؟