Skip to content

at函数原型 #7

Answered by caikelun
Mr-JingShi asked this question in Q&A
Discussion options

You must be logged in to vote

在运行时,根据C++成员函数的调用约定,需要把this作为第一个参数传递。如果是C++代码,C++编译器会为我们完成这些(可以看下C++函数调用生成的汇编代码)。但是在C代码中我们需要手工传递this参数。

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by caikelun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants