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
自己定义一个结构体,使用struct关键字struct student{ char
name[20]; int age; int
num;};定义好结构体,student就相当于变量类型,我们可以直接用来定义一个student类型的变量:student
A;也可以直接在定义结构体的时候直接进行...
分类:
编程语言 时间:
2014-05-20 01:08:22
阅读次数:
266
/* 题目: //声明一个结构体类型 struct _AdvTeacher { char
*name; char *tile; int age; ...
分类:
其他好文 时间:
2014-05-19 23:56:31
阅读次数:
412
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
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++一、 bool类型 bool取值false和true,是0和1的区别;
false可以代表0,但true有很多种,并非只有1。二、
const限定符常量在定义后就不能修改,所以定义时必须初始化。在一个文件全局作用域中定义非const变量,在另外的文件中做extern声明,就可以使用这.....
分类:
编程语言 时间:
2014-05-19 11:02:50
阅读次数:
271
题目链接: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【题意】给你一张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
题目描述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陷阱 先看下面一段代码:
文件main.cpp#includeusing namespace std;int main(int argc, char *argv[]){ int a
=0; switch(a) { case ...
分类:
编程语言 时间:
2014-05-19 07:08:14
阅读次数:
429