What are the differences between parameter definitions as (type& name), and (type* name)?
问题 A very basic question, but still, it would be good to hear from C++ gurus out there. There are two rather similar ways to declare by-reference parameters in C++. 1) Using "asterisk": void DoOne(std::wstring* iData); 2) Using "ampersand": void DoTwo(std::wstring& iData); What are implications of each method? Are there any gotcha's in any case? Bonus #1: What would be a formal way to call method in #1 and #2? Are they both called "by-reference"? Bonus #2: std::wstring is used deliberately. What