- 博客(8)
- 收藏
- 关注
原创 四边形的平移旋转
#include <GL/glut.h>#include <stdlib.h>#include <math.h> /* 初始化显示窗口大小 */ GLsizei winWidth = 600, winHeight = 600;/* 设置世界坐标系的显示范围 */ GLfloat xwcMin = 0.0, xwcMax = 225.0;GLfloat ywcMin = 0.0, ywcMax = 225.0;/* 定义二维点数据结构 */ class .
2020-06-22 15:51:57
855
1
原创 识别字符串中所有的*号
void classfyOp0(string str){ string Op[]={"+","-","*","!","=","<",">","&&","+="}; int len = sizeof(Op)/sizeof(Op[0]); string oldstr = str; string nochange = str; string newstr; int storeRes[20]; int site = 0; int OpSite = 0; int o.
2020-06-21 22:47:42
488
原创 词法分析识别数字和关键字
输入字符串来识别,但目前还未实现跳过回车以及空格功能。#include <iostream>#include <cstring>#include <stdlib.h>#include <sstream> using namespace std;string str[1000];string numstr[100];int index=0;template <class Type> Type stringToNum(con
2020-06-20 21:29:26
1061
1
转载 string数组的元素个数
今天查资料,找到一个大佬写的内容,解决了我的问题,就是求string[ ]里的元素个数,使用sizeof(strKeyword)/sizeof(strKeyword[0]int main(){ string strKeyword[] = {"class","void"}; for(int i = 0;i<sizeof(strKeyword)/sizeof(strKeyword[0]);i++) { cout<<strKeyword[i]<<endl; }
2020-06-20 15:14:45
2732
1
原创 汇编伪指令练习:输出hello
一个小程序,输出HELLO(伪指令的练习)message segment assume cs:message,ds:messageppp:mov ax,message mov ds,ax mov dx,offset msg mov ah,9 int 21h mov ah,4ch int 21hmsg db "HELLO$" message ends end ppp编写过程:首先定义一个段:message segment是段的开始,message ends是段的结束..
2020-05-30 18:30:48
706
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人