码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
c++中,bool与int 的区别
菜鸟一枚,为了观察区别,特地运行了下面几个语句 1 /*阅读程序回答问题, 2 1.bool类型的false对应数值?true呢? 3 2.非0整数对应bool型的?0呢? 4 */ 5 #include 6 #include 7 using namespace std; 8 int main...
分类:编程语言   时间:2015-07-15 18:36:48    阅读次数:226
字符串合并
#include"stdafx.h"#includeusing namespace std;void main(){char s1[202], s2[101];cout << "input the first string(Ended with ENTER)\n";cin.getline(s1, 1...
分类:其他好文   时间:2015-07-15 18:30:57    阅读次数:80
线性表顺序存储结构实现
#include<stdio.h> #define MAXSIZE 20 typedef int ElemType; typedef struct { ElemType data[MAXSIZE]; int length; }SqList; int get_elem(SqList *L, int i, ElemType *e) { if(L->length==0 ...
分类:其他好文   时间:2015-07-15 17:13:52    阅读次数:142
Linux API函数大全
(一)文件操作篇 1、creat(建立文件) 头文件 1 #include 2 #include 3 #include 定义函数 1 int creat(const char * pathname, mode_tmode); 函数说明 参数pathname指向欲建立的文件路径字符串。creat()相当于...
分类:Windows程序   时间:2015-07-15 17:12:49    阅读次数:245
HDU 2159 FATE
二维费用的背包#include#include#include#includeusing namespace std;const int maxn=105;const int INF=0x7FFFFFFF;int value[maxn],cost[maxn];int dp[maxn][maxn];i...
分类:其他好文   时间:2015-07-15 16:52:20    阅读次数:92
Bind[Exclude|Include]排除字段或只允许字段验证
1 public ActionResult xx([Bind(Exclude = "id")] xxModel xx, HttpPostedFileBase file)//排除id验证2 3 //Bind(Include="name,age") 只允许name和age验证ModelState.Re....
分类:其他好文   时间:2015-07-15 16:51:55    阅读次数:101
在linux下Lua调用C语言的两种方法
一.c语言作为应用程序的一部分#include #include #include #include #include //待Lua调用的C注册函数。static int add2(lua_State* L){ //检查栈中的参数是否合法,1表示Lua调用时的第一个参数(从左到右),依此类推。...
分类:编程语言   时间:2015-07-15 16:37:03    阅读次数:172
hdu 1712 分组背包入门
对于每门课程,学习的时间不同,收获也不同,在一门课程上花费了两个不同的时间去学习是互斥的,即它们是属于同一个组内的物品。直接做分组背包即可。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int max( int a,...
分类:其他好文   时间:2015-07-15 16:37:02    阅读次数:114
C++中引用的定义及使用
一、引用的概念:inta=2; int&b=a;//为变量a取了一个别名叫做b,a与b代表同一块内存二、引用作文函数的参数使用:#include<stdio.h> intadd1(int&i,int&j) { i=i+j; returni; } voidmain() { inta=2; intb=3; add1(a,b); printf("a=%d,b=%d",a,b);//结果..
分类:编程语言   时间:2015-07-15 15:20:37    阅读次数:126
poj2892--Tunnel Warfare(线段树)
题目链接:点击打开链接 题目大意:给出n个格子,三种操作,D k:消除第k个格子,R:恢复最后一次消除的格子,Q k:问和k相连的最长连续序列。 求最长连续序列,线段树统计每段中被消除的最大点和最小点,更新点k,查询段[1,k][k,n],然后相减得到结果 #include #include #include #include using namespace std ; #defin...
分类:其他好文   时间:2015-07-15 15:12:00    阅读次数:116
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!