at函数原型 #7
-
请问下:std::string里at的函数原型是reference at( size_type pos ); 请老师解答下。 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
c++里的reference底层实现是相对应类型的指针的原因吗? |
Beta Was this translation helpful? Give feedback.
-
在运行时,根据C++成员函数的调用约定,需要把this作为第一个参数传递。如果是C++代码,C++编译器会为我们完成这些(可以看下C++函数调用生成的汇编代码)。但是在C代码中我们需要手工传递this参数。 |
Beta Was this translation helpful? Give feedback.
在运行时,根据C++成员函数的调用约定,需要把this作为第一个参数传递。如果是C++代码,C++编译器会为我们完成这些(可以看下C++函数调用生成的汇编代码)。但是在C代码中我们需要手工传递this参数。