I need this program to display the output (" 111 56 "). Whats the problem with it?
Code:
#include <iostream.h>

class Exchg {
      public:
             void exchange (int& a, int& b) {
                  int temp = a;
                  a = b;
                  b = temp;}};
main () {
int num1 = 56;
int num2 = 111;
cout << "the two numbers: " << num1 << "," << num2 << "..." << endl;
exchange (num1, num2);
cout << "... are now exchanged: " << num1 << "," << num2 << endl;
}
thanks!