{ "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}", "selector": "source.c, source.c++, source.cpp", "shell": true, "cmd": ["g++", "${file}", "-o", "${file_path}...
分类:
编程语言 时间:
2015-04-02 13:33:29
阅读次数:
141
先分析一个例子。
#include
class CBase
{
public:
CBase()
{
printf("CBase\n");
}
~CBase()
{
printf("~CBase\n");
}
void SetNumber(int nInt)
{
this->m_nNumber = nInt;
}
int GetNumber()
{
retu...
分类:
其他好文 时间:
2015-04-02 10:29:49
阅读次数:
102
先分析一个例子
#include
class CFurniture
{
public:
CFurniture()
{
m_nPrice = 0;
}
virtual ~CFurniture()
{
printf("virtual ~CFurniture()\n");
}
virtual int GetPrice()
{
return m_nPrice;
}
publ...
分类:
其他好文 时间:
2015-04-02 10:26:06
阅读次数:
229
源码
#include
class CSoft
{
public:
CSoft()
{
m_nColor = 2;
}
virtual ~CSoft()
{
printf("virtual ~CSoft()\n");
}
virtual int GetColor()
{
return m_nColor;
}
virtual int SitDown()
{
...
分类:
其他好文 时间:
2015-04-02 10:24:23
阅读次数:
231
先献上源代码
#include
class CNumber
{
public:
CNumber()
{
m_nNumber = 1;
}
int m_nNumber;
};
void main()
{
CNumber *pNumber = NULL;
pNumber = new CNumber;
pNumber->m_nNumber = 3;
printf("%d \r\n...
分类:
其他好文 时间:
2015-04-02 09:14:10
阅读次数:
236
控制结构主要是关于 if/else switch/case
废话不多说。。献上代码及反汇编分析。。
#include
int main(int argc , char *argv[])
{
int nInt = 9;
// if(0 == nInt)
__asm
{
cmp DWORD PTR [EBP - 4h] , 0 ;
jle __exit;
}
// __...
分类:
其他好文 时间:
2015-04-01 23:52:29
阅读次数:
177
执行及代码:/**Copyright (c)2014,烟台大学计算机与控制project学院*All rights reserved.*文件名:d.cpp*作 者:张旺华*完毕日期:2014年11月10日*版 本 号:v1.0**问题描写叙述:求sin(π/2)和sin(56° )的值精度要求...
分类:
其他好文 时间:
2015-04-01 19:48:16
阅读次数:
99
题意:求最大子矩阵和。解题思路:枚举上下边界 ,用一维思路去搞。解题代码: 1 // File Name: 1081.cpp 2 // Author: darkdream 3 // Created Time: 2015年04月01日 星期三 16时57分14秒 4 5 #include 6 #in....
分类:
其他好文 时间:
2015-04-01 19:36:10
阅读次数:
165
一MFC菜单
1 菜单的相关问题
win32--HMENU
MFC----CMenu类对象-->实为菜单句柄的映射
CMenu类封装了操作菜单的各种API函数
封装了一个成员CMenu::m_hMenu保存菜单句柄
2.菜单使用
1.添加菜单资源
2.将菜单设置到窗口
1)在框架类窗口的WM_CREA...
分类:
编程语言 时间:
2015-04-01 15:31:57
阅读次数:
242
两个栈模拟一个队列,1号栈为入队,栈顶表示队尾;2号栈为出队,栈顶表示队首。
入队,直接进1号栈;出队,先判断2号栈是否有元素,有元素就直接弹出栈顶即队首,如果2号栈没有元素,则将1号栈的元素顺序弹出并进2号栈。
[cpp] view
plaincopy
#include
#include
#include
using name...
分类:
其他好文 时间:
2015-04-01 15:25:38
阅读次数:
139