1.场景切换新建一个类ImageScene#ifndef IMAGESCENE_H#define
IMAGESCENE_H#include #include USING_NS_CC;class ImageScene : public Layer
{public: virtual bool...
分类:
其他好文 时间:
2014-05-26 10:59:54
阅读次数:
429
qsort直接排序。 1 #include 2 #include 3 #include 4 5
#define MAXNUM 1000 6 7 typedef struct { 8 int index; 9 double statis;10 }
node_st;11 12 ...
分类:
其他好文 时间:
2014-05-26 10:05:44
阅读次数:
229
#include //头文件调用,写程序时都要加上,#define uint unsigned int
//宏定义,为了后面定义变量书写简便#define uchar unsigned charuchar mm=0; //全局变量uchar flag_get=0;
//定义标志位,为1则灯亮/**....
分类:
其他好文 时间:
2014-05-26 08:42:09
阅读次数:
276
在cpp头文件里面声明函数#ifndef _HEAD_#define _HEAD_#ifdef
__cplusplusextern "C" {#endif#define export_api __attribute__
((visibility("default")))export_api int ...
分类:
编程语言 时间:
2014-05-26 08:23:31
阅读次数:
287
今天闲来没事干,写个堆排序,用模版类实现的,数据可是任何可比较的类型。代码如下:MySqList.h 1 #ifndef __MYSQLIST 2
#define __MYSQLIST 3 template 4 class MySqList 5 { 6 private: 7 int len...
分类:
其他好文 时间:
2014-05-26 08:18:02
阅读次数:
274
如果向下面那样直接列出script标签可能会出现错误,
原因有两点:1、backbone中有define等关键字2、js的加载与执行顺序是无序的,所以有可能require先加载执行使backbone解决方案:第一步:配置require.config
r...
分类:
其他好文 时间:
2014-05-26 07:15:58
阅读次数:
266
#define USER_KEY @"users"#define GROUPNAME_KEY
@"groupName"@interfaceViewController (){ UITableView *_tableView; NSMutableArray
*_dataSource; BOOL ...
分类:
移动开发 时间:
2014-05-26 06:52:50
阅读次数:
316
假定每个单词用空格隔开。
例子:
输入:how are you!
输出:3
两种方法:
一:
#include
#include
#define SIZE 20
int main()
{
char str[SIZE]={'\0'};
int count=0;
printf("please input the string\n");
gets(str);
put...
分类:
编程语言 时间:
2014-05-26 03:44:36
阅读次数:
284
//
// fs_stream.h
// fsnet
//
// Created by Vincent on 14-5-22.
// Copyright (c) 2014年 Vincent. All rights reserved.
//
#ifndef fsnet_fs_stream_h
#define fsnet_fs_stream_h
#include "fs_define.h"...
分类:
其他好文 时间:
2014-05-24 18:19:34
阅读次数:
372
设两线段为(x1,y1) ,(x2,y2),
若使两线段相交,需使x1y2||x1>x2&&y1 2 #include 3 #include 4 #define MAXH 1005 5
using namespace std; 6 7 int n, m, k; 8 struct mem{ 9 ...
分类:
其他好文 时间:
2014-05-24 12:43:55
阅读次数:
333