码迷,mamicode.com
首页 >  
搜索关键字:const char p    ( 57984个结果
字符串系列函数(不断跟新)
1.sprintf,sprintf_ssprintf(char* buffer, const char* format, [argument]);vs下需要加上_CRT_SECURE_NO_WARNINGS#include using namespace std;int main(){ cha...
分类:其他好文   时间:2014-05-20 01:40:00    阅读次数:292
C++结构体再学心得
自己定义一个结构体,使用struct关键字struct student{ char name[20]; int age; int num;};定义好结构体,student就相当于变量类型,我们可以直接用来定义一个student类型的变量:student A;也可以直接在定义结构体的时候直接进行...
分类:编程语言   时间:2014-05-20 01:08:22    阅读次数:266
Demo_张仕传_结构体考试-modify
/* 题目: //声明一个结构体类型 struct _AdvTeacher { char *name; char *tile; int age; ...
分类:其他好文   时间:2014-05-19 23:56:31    阅读次数:412
(转)loff_t *ppos是什么东东
ssize_t generic_file_read(struct file * filp, char * buf, size_t count,loff_t*ppos)这是一个文件读函数我们很容易看出输入参数中filp 是文件buf 是文件要读到什么地方去,用户bufcount是要读多少东西那么ppo...
分类:其他好文   时间:2014-05-19 22:29:53    阅读次数:640
c++ 读文本文件
1. std::ifstream t("example.txt"); std::string str((std::istreambuf_iterator(t)), std::istreambuf_iterator());2void readfile(const std::stri...
分类:编程语言   时间:2014-05-19 21:27:01    阅读次数:321
从C到C++ (1)
从C到C++一、 bool类型 bool取值false和true,是0和1的区别; false可以代表0,但true有很多种,并非只有1。二、 const限定符常量在定义后就不能修改,所以定义时必须初始化。在一个文件全局作用域中定义非const变量,在另外的文件中做extern声明,就可以使用这.....
分类:编程语言   时间:2014-05-19 11:02:50    阅读次数:271
POJ 2828 Buy Tickets(神题!线段树or树状数组)
题目链接:POJ 2828 Buy Tickets【题意】给了你 n(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int pos[MAX], val[MAX], ans[MAX];13.....
分类:其他好文   时间:2014-05-19 10:10:34    阅读次数:282
HDU 2795 Billboard(线段树)
题目链接:HDU 2795 Billboard【题意】给你一张h*w(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int tree[MAX= val)26 {27 ...
分类:其他好文   时间:2014-05-19 10:09:17    阅读次数:419
hust 1625 Chessboard
题目描述Given an N*N(N#include#include#includeusing namespace std;const int maxn=1001;int group[maxn][maxn];bool vis[maxn][maxn];int dx[4]={0,0,1,-1};int ...
分类:其他好文   时间:2014-05-19 09:06:30    阅读次数:379
浅析C/C++中的switch/case陷阱
浅析C/C++中的switch/case陷阱 先看下面一段代码: 文件main.cpp#includeusing namespace std;int main(int argc, char *argv[]){ int a =0; switch(a) { case ...
分类:编程语言   时间:2014-05-19 07:08:14    阅读次数:429
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!