1 函数传参的顺序:#include //进栈栈地址是递减的。先进栈的在高地址,后进栈的在低地址。//函数传参:参数从最右边先进栈,先进后出。#include void fun(int a, ...) { int i; int *temp = &a; temp++; f...
分类:
其他好文 时间:
2014-09-18 12:56:53
阅读次数:
156
1 函数模板
template
T compare(const T & v1,const T &v2)
{
return ..
}
编译器承担了为每种类型编写函数的单调工作.
inline
template inline T min(const T&,const T&)
2 类模板
template
class Q{
T fun();
}...
分类:
编程语言 时间:
2014-09-16 23:46:41
阅读次数:
281
1:当无法列出传递函数的所有实参的类型和数目时,可用省略号指定参数表void foo(...);voidfoo(parm_list,...);2:函数参数的传递原理函数参数是以数据结构:栈的形式存取,从右至左入栈.eg:#includevoid fun(int a, ...){int *temp =...
分类:
其他好文 时间:
2014-09-16 23:28:11
阅读次数:
311
最近用vim写lua代码,发现由于ctags对lua支持不友好, 很多lua的符号都不能跳转 表现在1) ctags默认对lua的支持仅限于识别function, 不支持识别常量定义.2) 如果通过CLASS:MEMBER_FUN(...)方式以及CLASS.MEMBER_FUN()方式定义的fun...
分类:
其他好文 时间:
2014-09-15 15:52:19
阅读次数:
186
CasperJS项目中方法的封装和调用问题,第二个遇到的workflow问题。在其他代码中有几个方法,比如fun_A,fun_B,fun_C;现在某个方法调用它们,有一个错误的示范:casper.then(function(){ this.echo("xxxx"); this.wait(...
分类:
Web程序 时间:
2014-09-14 23:27:47
阅读次数:
295
??
Ext JS消息提示框主要包括:alert、confirm、prompt、show
1、Ext.MessageBox.alert()
调用格式:
alert( String title, String msg, [Function fn], [Object scope] )
参数说明:
title:提示框的标题。
msg:显示的消息内容。
[Fun...
分类:
其他好文 时间:
2014-09-13 21:30:25
阅读次数:
244
当我们的程序在运行时才能决定数组空间的大小的情况下,我们会经常使用new或者malloc来在堆空间中动态的申请一片空间,这是相当的方便和实用的。最近经常使用自己也发现了一些问题以及自己对这些问题的思考:
void main()
{
int *B;
cout<<*B;
fun(&B);
cout<<*B;
}
void fun(int **A)
{
*A=new int(10);
}上面...
分类:
其他好文 时间:
2014-09-13 15:57:05
阅读次数:
210
create or replace function Fun_GetRoleIDList(d_fid char) return varchar is rolelist varchar(2000);begin rolelist := ''; ---定义游标declare cursor role_cur...
分类:
数据库 时间:
2014-09-12 18:47:53
阅读次数:
293
1、纯虚函数class Base{public: Base(){}; virtual ~Base(){};};//类A是一个抽象类class A : public Base{public: A(){} virtual ~A(){} virtual void fun() ...
分类:
其他好文 时间:
2014-09-12 14:46:13
阅读次数:
204
int?i;?????????????//?定义了一个int类型的变量i;?而这样
typedef?INT?int;???//?表示用户自己定义了一个整型数据类型INT,实际上就等同于int?所以:INT?ii;
????????????...
分类:
其他好文 时间:
2014-09-11 21:04:02
阅读次数:
169