摘要: 以上方法不常用 报错: flush的作用: truncate截断方法: 文件模式: r+:读写模式,读正常,写的时候在最后写,但写了之后光标移动到最后,想要再读需要移动光标 w+:写读模式,写在最开始写,会覆盖原来的内容,想要读的时候要移动光标,基本上不用 a+:光标一开始在最后,读写都是在最后,不 阅读全文
posted @ 2019-07-30 16:09 淇实是我 阅读(128) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include #define GLUT_DISABLE_ATEXIT_HACK //不写这句话总运行出错,我也不知道为啥。。。 #include #include int change = 10; static GLfloat spin = 0.0;//static:静态全局变量,只要程序运行,内存中一直存在,文件内可见,文件外不可见 void in... 阅读全文
posted @ 2019-07-30 15:13 淇实是我 阅读(439) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include #include #include #include const double TWO_PI = 6.2831853; /*Initial display-window size*/ GLsizei winWidth = 800, winHeight = 600; GLuint regHex; class screenPt { ... 阅读全文
posted @ 2019-07-30 11:25 淇实是我 阅读(516) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include /*Initial display-window size*/ GLsizei winWidth = 600, winHeight = 500; /*Initialize raster position*/ GLint xRaster = 25, yRaster = 150; GLubyte label[36] = { 'J','a'... 阅读全文
posted @ 2019-07-30 11:24 淇实是我 阅读(204) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include #include #include const double TWO_PI = 6.2831853; /*Initial display-window size*/ GLsizei winWidth = 400, winHeight = 400; GLuint regHex; class screenPt { private: ... 阅读全文
posted @ 2019-07-30 11:22 淇实是我 阅读(591) 评论(0) 推荐(0) 编辑
摘要: #include"stdafx.h" #include void init(void) { glClearColor(1.0, 1.0, 1.0, 1.0); //调成白色 glMatrixMode(GL_PROJECTION); //设置投影参数 gluOrtho2D(0.0, 200.0, 0.0, 150.0); } //调整投影大小 vo... 阅读全文
posted @ 2019-07-30 11:20 淇实是我 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: #include "stdafx.h" #include #include #include #include #include struct TEACHER { char ID[20]; char Name[20]; char lesson[20]; }teacher[10]; struct ZHMM { char zh[20]; char mm[... 阅读全文
posted @ 2019-07-30 11:15 淇实是我 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-07-30 11:11 淇实是我 阅读(261) 评论(0) 推荐(0) 编辑