- 浏览: 2385 次
最新评论
文章列表
Rule of Modularity: Write simple parts connected by clean interface
Rule of Clarity: Clarity is better than cleverness
Rule of Composition: Design programs to be connected with other programs.
Rule of the Separation: Separate policy from mechanism; separate interfaces from engines.
Rule of Simpli ...
- 2004-05-26 21:40
- 浏览 1224
- 评论(0)
Case study
Case 1:
struct A { ...}
void Caller()
{
struct A b=getA(); (1)
...
}
struct A getA()
{
struct A a;
a.xxx=xxx
....
return a;
}
The (1)
getA() really return the address of a, the address in the stack which is destroyed, but now no one is using this sta ...
- 2004-05-26 21:38
- 浏览 1162
- 评论(0)