码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
远程线程注入dll
// CommonInject.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include #include #include #include using namespace std; #include #pragma comment(li...
分类:编程语言   时间:2014-06-20 13:09:49    阅读次数:306
C/C++ 修改控制台程序文字颜色
可以修改前景色(字体颜色)和背景色。 示例代码如下: #include #include //需要引用Windows.h using namespace std; int _tmain(int argc, _TCHAR* argv[]) { HANDLE hConsole; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); for(int i...
分类:编程语言   时间:2014-06-20 12:38:55    阅读次数:279
USACO numtri 数塔问题
/* ID:kevin_s1 PROG:numtri LANG:C++ */ #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define MAXN 1001 //gobal v...
分类:其他好文   时间:2014-06-20 12:02:24    阅读次数:192
使用静态成员处理时间类
程序代码: #include using namespace std; class Time { public: Time(int=0,int=0,int=0); void show_time( ); //根据is_24和from0,输出适合形式-20:23:5/8:23:5 pm/08:23:05 pm void add_seconds(int); //增加n秒钟 void ad...
分类:其他好文   时间:2014-06-20 09:53:39    阅读次数:206
一种全排列
1 #include 2 #include 3 using namespace std; 4 5 #define N 4 6 7 void fullarrange(char num[], int len, int index) { 8 if(index == len) { 9 ...
分类:其他好文   时间:2014-06-20 08:51:28    阅读次数:293
【HDOJ】1811 Rank of Tetris
并查集+拓扑排序。使用并查集解决a = b的情况。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 #define MAXN 10005 8 9 typedef struct ...
分类:其他好文   时间:2014-06-11 21:54:30    阅读次数:284
十五周 项目1 工资数据的输入
/* 输入员工工资1000-10000之间,并按从大到小输出*/ #include using namespace std; int main( ) { double salarys[500]; int n=0; double t; while(cin>>salarys[n]) { n++; //从cin流读取数据 ...
分类:其他好文   时间:2014-06-07 15:36:38    阅读次数:191
C++ cin不支持录入空格
如果在C++中,用cin>>str;这种方法来接收字符串那么录入的str不能包含空格,否则它会按照空格将整个字符串切分成若干段。如果你要是想输入带空格的字符串那就要用到getline()这个函数了。 示例代码如下: #include #include //getline 包含在 sstream 中,要include! using namespace std; int _tmain(int...
分类:编程语言   时间:2014-06-07 15:28:59    阅读次数:239
error LNK2005 : already defined in libcmt.lib
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: "public: virtual char const * __thiscall std::exception::what(void)const " (?what@exception@std@@UBEPBDXZ) already defined in libcmt.lib(stdexcpt.obj) 1>MS...
分类:其他好文   时间:2014-06-07 14:42:14    阅读次数:947
uva 11987 Almost Union-Find (并查集)
题目大意: 三个操作。 1. 合并两个集合 2.把第一个元素放到第二个集合里 3.输出集合的数量和和。。 思路分析: 要用p记录这个元素所在集合编号,然后用编号建立并查集。 #include #include #include #include using namespace std; typedef long long LL; int set[111111...
分类:其他好文   时间:2014-06-07 12:52:40    阅读次数:267
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!