C++
phoenix13suns
这个作者很懒,什么都没留下…
展开
-
运算符重载
#include#include#include #include using namespace std;struct D{ int a; int b; bool operator A.b) return 1; } return 0; }}t[10];int main (){ map m; t[1].a=1; t[1].b=10; t[2].a=1; t[2].b=9; t[3].a=2; t[3].b=原创 2010-12-04 12:09:00 · 301 阅读 · 0 评论 -
派生类的继承
Public Public Protected------>publicProtectedprivate-----------Public ProtectedProtected--->ProtectedProtectedprivate-----------Public privateProtected--->privateprivateprivate-----------原创 2011-01-16 20:24:00 · 257 阅读 · 0 评论 -
2094 map应用
#include #include #include #include using namespace std;int main (){ //freopen("1.txt","r",stdin); map m; set s; set::iterator it; string win,lose; int i,n,count; while(cin>>n,n) { s.clear(); m.clear(); for (i=0;i>win>>原创 2010-11-20 22:41:00 · 429 阅读 · 0 评论 -
_stdcall _cdecl fastcall 调用方式详解
<br />在C语言中,假设我们有这样的一个函数: int function(int a,int b) 调用时只要用result = function(1,2)这样的方式就可以使用这个函数。但是,当高级语言被编译成计算机可以识别的机器码时,有一个问题就凸现出来:在CPU中,计算机没有办法知道一个函数调用需要多少个、什么样的参数,也没有硬件可以保存这些参数。也就是说,计算机不知道怎么给这个函数传递参数,传递参数的工作必须由函数调用者和函数本身来协调。为此,计算机提供了一种被称为栈的数据结构来支持参数传递。 栈转载 2011-01-18 22:11:00 · 287 阅读 · 0 评论 -
mfc
1.brush 窗口颜色 #define WHITE_BRUSH 0 #define LTGRAY_BRUSH 1 #define GRAY_BRUSH 2 #define DKGRAY_BRUSH 3 #define BLACK_BRUSH 4 #define NULL_BRUSH 5 #define HOLLOW_BRUSH NULL_BRUSH原创 2011-01-22 17:43:00 · 855 阅读 · 0 评论