自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 资源 (2)
  • 收藏
  • 关注

原创 在TS语言H5项目中使用Protobufjs(二) - Layaair腊鸭引擎篇

大家好,又见面了,上一篇我们介绍了如何在Egret中使用Protobufjs。至于为什么选protobufjs,请点击这里阅读我上一篇文章这篇我们重点介绍,如何在Layaair的TS项目中使用它。首先,因为我用的是ts版本创建的项目。所以能和Egret一样使用。只是配置有所区别。 如何安装  npm install [email protected] -g ...

2018-10-08 11:36:30 1279

原创 Vector求期末成绩

Vector求期末成绩

2014-06-01 10:14:20 883

原创 返回指针的函数

返回指针的函数

2014-04-19 09:56:39 607

原创 Directx 纹理贴图 模仿地面效果

Directx 纹理贴图 模仿地面效果

2014-04-12 17:45:53 1146

原创 Directx 绘制一四边形 并且绕Y轴顺时针匀速转动

DIRECTX 绘制四边形效果

2014-04-12 09:52:20 1052

原创 调用拷贝构造函数的三种形式

#include #include using namespace std;class MyClass{public: MyClass(int x1 = 1, int y1 = 2); MyClass(const MyClass& mc1); void print() { cout<<x<<'\t'<<y<<endl; }private: int x,y;};M

2014-03-19 09:27:38 692

原创 输出迭代器 ostream_iterator 把输入的一串字符按每行一个单词输出

//split头文件#include #include #include #include #include using namespace std;inline bool space(char c){ return isspace(c);}inline bool not_space(char c){ return !isspace(c);}template

2014-03-18 16:36:11 506

原创 统计各单词出现的行数---键值对

#include #include #include #include #include //使用关联式容器map musing namespace std;vector split(const string&);//把各行的单词放进键值对中,即单词和单词出现的行数,行数保存在一个向量中map > xref(istream& in, vector find_words(co

2014-03-14 17:17:55 480

原创 利用键值对统计单词出现的次数

#include #include #include #include //使用关联式容器map musing namespace std;void main(){ string s; map counters; while (cin>>s) { ++counters[s]; //增加每个单词出现的次数 } for (map::const_iterator i

2014-03-14 15:48:07 476

原创 辗转相除法求两个数是否互素

#include using namespace std;int gcd(int x,int y);void main(){ int x,y; cin>>x>>y; if(gcd(x,y)==1) cout<<"互素!"<<endl; else cout<<"不互素!"<<endl;}//版本一int gcd(int x,int y){ int c;

2014-03-07 11:11:20 2905

原创 在一个矩形框中输出一条问候语

第一个版本// ask for a person's name, and generate a framed greeting#include #include int main(){ std::cout << "Please enter your first name: "; std::string name; std::cin >> name; // build the

2014-03-05 09:36:00 579

原创 求两个数的最大公约数和最小公倍数

#includeint qzdgys(int m,int n) /*求最大公约数*/{ int min; if(m<=0||n<=0) return -1; if(m>n) /*取输入的两个数中最小的数赋给min*/ min=n; else min=m; while(min) { if(m%min==0 && n%min==0) /*分别对mi

2014-02-24 20:46:12 571

原创 把一个合数分解为几个质因数相乘

#include int a(int a){ int i; for(i=2; i<a; ++i) if(a%i == 0) return 0; //a为合数时返回0 return 1; //a为质数时返回1}//递归函数void f(int n){ if(a(n)) printf("n=%d是一个质数!\n",n); else { printf("%d=

2014-02-24 20:04:17 2332

原创 求f(x)=1-x的2次方的定积分

//求f(x)=1-x2的定积分#include #include #include #include double p(int n){double x,y;time_t t;int i,count=0;srand((unsigned)time(&t));for(i=0;i<n;i++){x=rand()%100/100.0;y=rand()%100/100.0;if(y<=1-pow(x,2))

2014-02-24 19:55:29 2763

原创 Direct3D 初始化

Direct3D 初始化

2013-12-23 17:29:34 583

c#编程规范

c#编程规范

2015-01-09

c++编程规范

c++编程规范

2015-01-09

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除