A very simple question, but, nevertheless, it would be nice to hear from a C ++ guru.
There are two pretty similar ways of declaring byte parameters in C ++.
1) Using an asterisk:
void DoOne(std::wstring* iData);
2) Using the "ampersand":
void DoTwo(std::wstring& iData);
What are the implications of each method? Is there any question anyway?
Bonus # 1: What will be the formal way to call the method in # 1 and # 2? Are they both called "by-reference"?
Bonus # 2: std :: wstring is used deliberately. What will matter for standard library classes in each case?
source
share