From 33d6cc7588c3577598dbfde616e6356f2c4ee869 Mon Sep 17 00:00:00 2001 From: hairrrrr <57317724+hairrrrr@users.noreply.github.com> Date: Mon, 10 Feb 2020 14:16:28 +0800 Subject: [PATCH] Update readme.md --- .../stucture-as-func-parameter/readme.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/C Crash Course/16 Sturcture&Union&Enum/stucture/prelesson/stucture-as-func-parameter/readme.md b/C Crash Course/16 Sturcture&Union&Enum/stucture/prelesson/stucture-as-func-parameter/readme.md index 7be54c2..527275a 100644 --- a/C Crash Course/16 Sturcture&Union&Enum/stucture/prelesson/stucture-as-func-parameter/readme.md +++ b/C Crash Course/16 Sturcture&Union&Enum/stucture/prelesson/stucture-as-func-parameter/readme.md @@ -1,18 +1,22 @@ -#### 结构体作为函数参数 +## 结构体作为函数参数 **明天的日期** *写一个程序:输入今天的日期,求明天的日期* 看着这个问题简单,实际上稍微有点技巧. + 给出下面四个特殊日期,大家可以思考一下: >2020 - 1 -31 ->2020 - 11 - 31 ->2020 - 12 - 31 ->2000 - 2 - 28 -#### Use sturcture itself as a function's parameter +2020 - 11 - 31 + +2020 - 12 - 31 + +2000 - 2 - 28 + +## Use sturcture itself as a function's parameter it's not an efficient way >K & R said (p.131 ) >"if a large structure is to be passed to a function, ->in is generally more efficent to pass a pointer than to copy the whole structure" \ No newline at end of file +>in is generally more efficent to pass a pointer than to copy the whole structure"