static void Main(string[] args) { //string[] str =
{ "", "" }; //TestParams(str); //TestParams("我","爱","北京","...
分类:
其他好文 时间:
2014-05-04 11:42:53
阅读次数:
190
1,指针没有指向一块合法的区域1指针没有初始化12345678910111213#include #include struct aa{char
*pa;char c;}ssa,*ssb;void main(){strcpy(ssa.pa,"abc");printf("%s \n",ssa.pa);...
分类:
其他好文 时间:
2014-05-04 11:38:09
阅读次数:
278
原始地址:XMPPFrameWork IOS
开发(五)获取好友信息和添加删除好友好友列表和好友名片[cpp]view
plaincopyprint?[_xmppRosterfetchRoster];//获取好友列表//获取到一个好友节点-(void)xmppRoster:(XMPPRoster*)...
分类:
其他好文 时间:
2014-05-04 11:19:57
阅读次数:
273
函数的编码风格1.注释2,空行3,缩进4,参数长度,代码长度,语句长度要合适。5,少用全局变量6,指针仅作输入参数时,可用const
设置其为只读属性,避免其在函数中被修改。7,函数默认的输入输出参数为int
类型,无输入参数或输出参数时要注意用void8,入口参数进行断言检验来自为知笔记(Wiz)
分类:
其他好文 时间:
2014-05-04 11:10:26
阅读次数:
300
原始地址:XMPPFrameWork IOS 开发(四)消息//收到消息 -
(void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message{
// NSLog(@"message =...
分类:
其他好文 时间:
2014-05-04 11:04:08
阅读次数:
300
UIImagePickerController#pragma mark 从用户相册获取活动图片-
(void)pickImageFromAlbum{ imagePicker = [[UIImagePickerController alloc] init];
imagePicker.del...
分类:
其他好文 时间:
2014-05-04 10:41:38
阅读次数:
337
/*素数求和问题时间限制:3000 ms | 内存限制:65535 KB 难度:2描述
现在给你N个数(0int a[1000]={1,1,0,0,0};void f() { int i,j; for(i=2;i<100;i++) {
if(a[i]...
分类:
其他好文 时间:
2014-05-04 10:36:15
阅读次数:
239
OC点语法和变量作用域一、点语法(一)认识点语法声明一个Person类: 1 #import 2 3
@interface Person : NSObject 4 { 5 int _age;//默认为@protected 6 } 7 8 -
(void)setAge:(int)age;...
分类:
其他好文 时间:
2014-05-04 10:25:07
阅读次数:
311
首先看下面这个例子
public static void main(String[] args) {
ArrayList al1 = new ArrayList();
al1.add(1);
ArrayList al2 = new ArrayList();
al2.add("hello");
//int型链表和string型链表,结果为true
System.out.p...
分类:
编程语言 时间:
2014-05-03 22:02:53
阅读次数:
376
//非递归遍历一棵树 需要借助栈
#include
#include
struct Tree
{
int nValue;
Tree *pLeft;
Tree *pRight;
};
struct Stack
{
Tree *root;
Stack *pNext;
};
Stack *pStack = NULL;
void push(Tree *root)
{
St...
分类:
其他好文 时间:
2014-05-03 20:55:41
阅读次数:
325