mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 12:32:21 +00:00
Update ch2-01-hello-cgo.md
This commit is contained in:
parent
74e6a48421
commit
2a4d220c91
@ -98,7 +98,7 @@ func main() {
|
||||
void SayHello(const char* s);
|
||||
```
|
||||
|
||||
其中只有一个SayHello函数的声明。但是作为hello模块的用户来说,就可以放心地使用SayHello函数,二无需关心函数的具体实现。而作为SayHello函数的实现者来说,函数的实现只要满足头文件中函数的声明的规范即可。下面是SayHello函数的C语言实现,对应hello.c文件:
|
||||
其中只有一个SayHello函数的声明。但是作为hello模块的用户来说,就可以放心地使用SayHello函数,而无需关心函数的具体实现。而作为SayHello函数的实现者来说,函数的实现只要满足头文件中函数的声明的规范即可。下面是SayHello函数的C语言实现,对应hello.c文件:
|
||||
|
||||
```c
|
||||
// hello.c
|
||||
|
Loading…
x
Reference in New Issue
Block a user