Why is it that if I have a method like this to swap two numbers, it doesn't work[swap], (I know I can accomplish this by defining pointers in the prototype and then passing the addresses of the relevant variables in main()), yet it works for arrays without having to supply pointers and addresses?
It does not work.
void num_exchange(int m, int n);
int main(){
int num1 ...READ MORE
Jul 27, 2022
in C++
by
Nicholas
• 7,760 points
•
454 views