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
#include using namespace std;struct MyStruct{
int s;};int main(){ void* addr = new MyStruct;//缓冲区地址,大小为mysturct的大小 int * naddr
= new (addr)in...
分类:
编程语言 时间:
2014-05-20 00:12:47
阅读次数:
382
#include using namespace std;#define
StructArrarySize 5 // 老师数量 #define StudentNum 3 // 每位老师...
分类:
其他好文 时间:
2014-05-20 00:11:27
阅读次数:
342
经典dp问题,花店橱窗布置,不再多说,上代码#include #include #include
#include #include #define N 150#define inf 0x7f7f7f7fusing namespace std;int n,
m;int val[N][N], f[.....
分类:
其他好文 时间:
2014-05-19 22:26:02
阅读次数:
349
1 #include "iostream" 2 #include "string" 3 using
namespace std; 4 5 typedef struct node{ 6 string data; 7 struct node *next; 8
node(str...
分类:
其他好文 时间:
2014-05-19 22:08:01
阅读次数:
368
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
题意:是输入N,2#include#includeusing namespace std;bool
temp[100000];bool Try(int n)//判断素数 { if(n==2) return true; for(int i=2;i>n) {
...
分类:
其他好文 时间:
2014-05-19 11:19:42
阅读次数:
168
1. vs 中新建win32 dll 项目 testdll添加实现文件
test.cpp#include "stdafx.h" #include using namespace std;int Add(int plus1, int
plus2){ int add_result = plus1 ...
分类:
编程语言 时间:
2014-05-19 10:25:52
阅读次数:
309
题目链接: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