What's the difference between these two function declarations in C/C++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the difference between these two function declarations in C/C++?

return_type function(arg_type * arg); return_type function(arg_type &arg); What's the difference between these two declarations?

8th Apr 2021, 7:00 AM
Antônio Gabriel Zeni Landim
Antônio Gabriel Zeni Landim - avatar
3 Answers
+ 2
Note that it's not 'C/C++'. The second declaration is NOT valid in C, it is only valid in C++.
8th Apr 2021, 7:50 AM
XXX
XXX - avatar
+ 2
Also, you have 3 questions with the same content. Please delete the other 2 as they are duplicates https://sololearn.com/discuss/2749239/?ref=app https://sololearn.com/discuss/2749237/?ref=app
8th Apr 2021, 7:52 AM
XXX
XXX - avatar
0
Sorry for the duplicates. SL was acting all weird.
12th Apr 2021, 11:49 AM
Antônio Gabriel Zeni Landim
Antônio Gabriel Zeni Landim - avatar