0
Can someone explain me the difference between them?
// first code int total = 100 ; int sum = total ; cout << sum ; and // second code int total = 100 ; int &sum = total ; cout << sum ; both results sum 100
1 Antwort
+ 1
&sum is an alias of total
// first code int total = 100 ; int sum = total ; cout << sum ; and // second code int total = 100 ; int &sum = total ; cout << sum ; both results sum 100