码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
C++空类以及没有成员变量的类的大小
关于C++中空类的大小为1,我们大家都有所了解,但是除了空类之外的其他一些没有成员变量的类的大小,还是有很多不明之处的。 我们来看如下一个例子:#includeusing namespace std; class a {}; class b{}; class c :public a{ vir...
分类:编程语言   时间:2014-06-28 19:01:26    阅读次数:140
POJ 3070 Fibonacci(矩阵快速幂)
题目链接题意 : 用矩阵相乘求斐波那契数的后四位。思路 :基本上纯矩阵快速幂。 1 //3070 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct Matrix 9 {10 int v[2][2...
分类:其他好文   时间:2014-06-28 17:48:14    阅读次数:214
sdut2613(This is an A+B Problem)大数加法
#include #include #include #include using namespace std;char a[1010],b[1010];int ta[1010],tb[1010];int main(){ int l2,l1,l; while(scanf("%s%s",a...
分类:其他好文   时间:2014-06-28 17:39:49    阅读次数:189
MongoDB在MFC下使用C++驱动编译错误的解决
今天使用MongoDB的C++驱动,在编译连接的时候一直出现错误,显示的string_data.h下93行max宏的问题,可视其本身并不是调用max宏,而是调用std::numeric_limits::max这样就是产生错误,通过搜索发现解决方法(参考网址:http://blog.chinaunix...
分类:数据库   时间:2014-06-20 17:08:50    阅读次数:273
C++类基本--随笔
void run(test *p)//利用指针调用{ coutrp(100)using namespace std;class ballscore { protected: const static int gbs = 5;//好球单位得分 原先C++...
分类:编程语言   时间:2014-06-20 16:51:20    阅读次数:242
将两个数组A和B合并为一个有序的C数组
1 # include 2 # include 3 # include 4 using namespace std; 5 void Sort(int a[],int b[],int c[],int n,int m) 6 { 7 int A=0, B=0, C=0; 8 while(...
分类:其他好文   时间:2014-06-20 16:13:08    阅读次数:143
HDU 1171
母函数简单题 1 #include 2 #include 3 using namespace std; 4 5 const int MAX=130000; 6 int c1[MAX],c2[MAX]; 7 8 struct { 9 int val,num;10 }thing[55];...
分类:其他好文   时间:2014-06-20 16:07:13    阅读次数:164
C/C++中判断某一文件或目录是否存在
1 //1.C++很简单的一种办法: 2 #include 3 #include 4 using namespace std; 5 #define FILENAME "stat.dat" 6 int main() 7 { 8 fstream _file; 9 _file.o...
分类:编程语言   时间:2014-06-20 15:45:52    阅读次数:327
第一届
A(Phone Number)1.暴力 #include #include #include #include #include using namespace std;int cmp(const void *a,const void *b){ return strcmp((char *)a...
分类:其他好文   时间:2014-06-20 14:41:04    阅读次数:139
链表实现多项式求和求积
#include #include #includeusing namespace std;struct Node { double coef; int expn; Node *next;};void CreatPolynomial(Node *&head, int n) ...
分类:其他好文   时间:2014-06-20 14:17:26    阅读次数:285
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!