C++实现字符串数组的两种方式1、常用的方法#include #include using namespace std;int main(){ string str[]={"hello", "string", "world"}; int str_size=sizeof(str)/size...
分类:
编程语言 时间:
2015-05-15 10:37:35
阅读次数:
167
#defineWM_TIMER_HIDEBALLOON(WM_USER+103)
BOOLCUpdateDlg::ShowBalloonTip(LPCTSTRszMsg,LPCTSTRszTitle,UINTuTimeout,DWORDdwInfoFlags)
{
m_nid.cbSize=sizeof(NOTIFYICONDATA);
m_nid.uFlags=NIF_INFO;
m_nid.uTimeout=uTimeout;//10s~30s之间,不过好像无效,所以设置..
分类:
其他好文 时间:
2015-05-15 01:26:05
阅读次数:
536
http://poj.org/problem?id=1330 1 #include 2 #include 3 #include 4 #define mt(a,b) memset(a,b,sizeof(a)) 5 using namespace std; 6 const int inf=0...
分类:
其他好文 时间:
2015-05-14 23:22:22
阅读次数:
258
#include
#include
typedef struct Node
{
int xishu;
int zhishu;
struct Node *next;
}NoDe;
void Build(NoDe *L){
NoDe *p,*q;
int a,b;
//p=(NoDe*)malloc(sizeof(N...
分类:
其他好文 时间:
2015-05-14 18:43:41
阅读次数:
121
#include #include int main(int argc, char* argv[]) { int (*array[5])[6]; printf("%d\n", sizeof(array)); // 20 printf("%d\n", sizeof(*ar...
分类:
其他好文 时间:
2015-05-14 13:42:28
阅读次数:
116
1 #pragma comment(linker, "/subsystem:console") 2 #include 3 #include 4 #include 5 #include 6 #define getpch(type) (type*)malloc(sizeof(type)...
分类:
其他好文 时间:
2015-05-14 11:22:57
阅读次数:
104
题目的意思是输入N,有多少种由2的整数幂相加的情况。
下面的是AC 的代码:
#include
#include
using namespace std;
int dp[1000002];
int a[21];
const int mod = 1000000000;
int main()
{
int i;
memset(dp, 0, sizeof(dp));
dp[0] = 0;...
分类:
其他好文 时间:
2015-05-13 21:53:42
阅读次数:
160
算术运算符运算符的优先级括号 > 正负 > 数学运算 > 位运算 > 数学对比 > 逻辑对比 > 条件运算 > 赋值运算A.赋值运算符复合赋值运算符+=-+*=/=B.自增自减a++ ++aa— —aps:没有自乘自除:a** a//C.sizeof输出所占字节数D.关系运算除了0之外都是true返...
分类:
编程语言 时间:
2015-05-13 18:52:43
阅读次数:
248
#include
#include
const int maxn = 2000 + 10;
int setA[maxn], setB[maxn], AB[maxn], cnt, VIS[maxn];
void init() {
memset(setA, 0, sizeof(setA));
memset(setB, 0, sizeof(setB));
memset(AB, 0, sizeo...
分类:
其他好文 时间:
2015-05-13 14:48:17
阅读次数:
106
分析:DFS即可。
#include
using namespace std;
bool map[21][21];
bool vis[21];
int ans[21],num,m;
void init()
{
int i,a;
memset(map,false,sizeof(map));
for(i=1;i<=20;i++) //构图
{
map[i][ci...
分类:
其他好文 时间:
2015-05-13 14:45:50
阅读次数:
139