码迷,mamicode.com
首页 >  
搜索关键字:控制台应用程序    ( 1070个结果
在win32控制台应用程序中实现定时器
1.SetTimer:在控制台应用程序中同样可以用SetTimer实现定时器的效果。 普通的win32程序中定时器的应用很多也很方便,但是在win32控制台中也是可以使用定时器的,利用的是windows程序的消息循环机制,如下: #include #include using namespace std; //定时器ID DWORD dwTimerId = 0; void CALLB...
分类:Windows程序   时间:2015-08-25 19:36:14    阅读次数:222
排列与组合的实现
排列与组合,递归实现 // Permutation and Combination.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include using namespace std; vector>aaa; set>solu; void do_once(vector&selected, vector&re...
分类:其他好文   时间:2015-08-25 12:06:20    阅读次数:184
ACM学习-图双连通子图
// ACM学习-割点和桥.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include #include using namespace std; const int v = 13; int edge[v][v] = { { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0...
分类:其他好文   时间:2015-08-25 12:01:46    阅读次数:253
析构函数中的virtual是否必要?
我们经常听到建议要把构造函数不能为虚,析构函数最好为虚,这是为什么?如下例子:// pvtable1.cpp : 定义控制台应用程序的入口点。#include "stdafx.h"#include using namespace std;class Base1 {public: Base1()...
分类:其他好文   时间:2015-08-21 19:05:27    阅读次数:144
虚函数表是个什么鬼?
在多重继承里的虚函数表可以在vs里面看到,如下有一个基类就有一张表,可以通过 int** pVtab = (int**)&d; pFun = (Fun)pVtab[0][0];来访问每一个虚函数,如下代码:// pvtable1.cpp : 定义控制台应用程序的入口点。//#includ...
分类:其他好文   时间:2015-08-21 18:54:31    阅读次数:136
最小的k个数
1 // 最小的k个数.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 11...
分类:其他好文   时间:2015-08-21 18:53:32    阅读次数:195
Windows下创建静态库
开发工具vs2010 1、新建win32控制台应用程序 点击项目属性,选择配置属性为Release,配置类型为静态库 2、Build工程后,在Release模式下找到lib文件...
分类:Windows程序   时间:2015-08-20 16:55:54    阅读次数:140
Windows下使用静态库
开发工具 vs2010 1、新建win32控制台应用程序 2、将静态库的头文件包含在程序中并手动链接静态库...
分类:Windows程序   时间:2015-08-20 16:55:00    阅读次数:155
自己实现一个IOC(控制翻转,DI依赖注入)容器
1.新建一个控制台应用程序 TestIOC2.新增一个 IocFactory类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml;using System...
分类:其他好文   时间:2015-08-20 15:14:31    阅读次数:124
静态函数调用非静态函数的小例子
// tt.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" class A { public: void fun() { printf("1111111111"); } static void fun2() { fun(); } }; int _tmain(int argc, _TCHAR* argv[]) { A a; A:...
分类:其他好文   时间:2015-08-19 20:33:09    阅读次数:135
1070条   上一页 1 ... 66 67 68 69 70 ... 107 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!