I tried the changes but it still doesnt work, but now im only down to one error, parse error on line 17, but i only have 16 lines, here's the code so far:
ps i meant to say the book wasnt that good, maybe you can suggest a better one?Code:#include <iostream.h> class Exchg { public: void exchange (int& a, int& b) { int temp = a; a = b; b = temp;} int main () { Exchg e int num1 = 56; int num2 = 111; cout << "the two numbers: " << num1 << "," << num2 << "..." << endl; e.exchange (num1, num2); cout << "... are now exchanged: " << num1 << "," << num2 << endl; return 0; }



LinkBack URL
About LinkBacks



