< 2024年3月 >
252627282912
3456789
10111213141516
17181920212223
24252627282930
31123456

# 随笔档案

•

### 最新评论

"所以通过栈可以传递无穷个参数, 大小只受内存大小限制."

re: LUA Coroutine[未登录] pass86 2010-11-09 10:55

re: automake使用小记[未登录] pass86 2010-01-07 13:04
bjam呢？
test的代码very easy.

re: C++代码优化（二） pass86 2007-08-14 20:59

re: VC2008 beta2 的几个新东西 pass86 2007-08-14 12:48
2. 对于模板的>>符号，中间不再需要空格了。

re: 学习 STL ,BOOST pass86 2007-08-11 14:42

re: 基本概念:函数的传值(4) pass86 2007-08-09 22:59

//测试代码
#include <iostream>
using namespace std;
void fun1(int*& a, int*& b)
{
int* tem = b;
b = a;
a = tem;
}

void fun2(int* a, int* b)
{
int tem = *b;
*b = *a;
*a = tem;
}
void fun3(int* a, int* b)
{
int* tem = b;
b = a;
a = tem;
}

int main()
{
{
int a = 1;
int b = 2;
int* a1 = &a;
int* b1 = &b;
cout << a << ", " << b << endl;
cout << a1 << ", " << b1 << endl;
fun1(a1, b1);
cout << a << ", " << b << endl;
cout << a1 << ", " << b1 << endl;
}
{
int a = 1;
int b = 2;
int* a1 = &a;
int* b1 = &b;
cout << a << ", " << b << endl;
cout << a1 << ", " << b1 << endl;
fun2(a1, b1);
cout << a << ", " << b << endl;
cout << a1 << ", " << b1 << endl;
}
{
int a = 1;
int b = 2;
int* a1 = &a;
int* b1 = &b;
cout << a << ", " << b << endl;
cout << a1 << ", " << b1 << endl;
fun3(a1, b1);
cout << a << ", " << b << endl;
cout << a1 << ", " << b1 << endl;
}

return 0;
}
//测试结果：
1, 2
0x22ff74, 0x22ff70
1, 2
0x22ff70, 0x22ff74
1, 2
0x22ff68, 0x22ff6c
2, 1
0x22ff68, 0x22ff6c
1, 2
0x22ff68, 0x22ff6c
1, 2
0x22ff68, 0x22ff6c
re: 基本概念:函数的传值(4) pass86 2007-08-09 20:19
void fun3(int *a, int *b){
int* tem = b;
b = a;
a = tem;
}

int a = 1;
int b = 2;
int *a1 = &a;
int *b1 = &b;
fun3(a1,b1);

fun2我真还理解进去。
re: 一条语句中的逻辑 pass86 2007-08-09 14:38
@ken

re: 说话的艺术 pass86 2007-08-07 23:00

re: File I/O pass86 2007-08-07 12:21
@SmartPtr

re: File I/O pass86 2007-08-06 10:43
<fstream>
re: 一条语句中的逻辑 pass86 2007-08-05 17:16

re: 一条语句中的逻辑 pass86 2007-08-04 22:42

re: 向Pane、Splitter前进 pass86 2007-08-02 18:47

re: 几种peer review的比较 pass86 2007-08-02 15:34
Apache用什么写的，不知者无畏。
re: 用c++，写小型病毒 pass86 2007-08-02 11:09

re: C++多线程（六） pass86 2007-07-30 11:18
__try __finally反掌不是标准C++里，可能是WIN32 SDK里的，也可能是MFC中的，了解较少。LZ的系列帖子赞一个。
re: 初探ogre pass86 2007-07-29 13:05
@南斗

re: socket vs RMI, 选择？ pass86 2007-07-29 12:32

re: 初探ogre pass86 2007-07-29 12:25
DEBUG和release效率差别很大哦。
What is CEGUI?
re: C++多线程（二） pass86 2007-07-25 14:43

Just have a look.
re: C++多线程(一) pass86 2007-07-24 19:18

SO EASY.
re: C++内存泄露检测（三） pass86 2007-07-23 21:46

re: boost1.34.0编译日志 pass86 2007-07-23 13:20
1.34.0用MinGW编译貌似有问题，

re: windows同步对象小结 pass86 2007-07-22 22:43
ACE的很期待。
re: windows同步对象小结 pass86 2007-07-22 22:40

cout标准输出流对象，cin是标准输入流对象，还有你可以自己定义输入输出流对象。

re: VC++ 编译链接错误汇总 pass86 2007-07-21 15:44

Bootsect.dos？CAN GOTO LINUX?
re: 关于GOOF的bug问题 pass86 2007-07-19 18:58
WHAT IS GOOF? I WANT TO KNOW.