

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


// -----File A.h begins here----------- 1 #ifndef A_H 2 #define A_H 3 4 #include
39 //-----File main.cpp begins here 40 #include "A.h" 41 42 void test (A&); 43 44 int main() 45 { 46 A a(60); 47 48 A * aPtr = & a; 49 50 a.print(); 51 52 test(a); 53 54 aPtr->print(); 55 56 return 0; 57 } 58 59 void test( A & x) 60 { 61 62 x.increment(2); 63 }
Value of val is: 60 Value of val is: 62