|
|
|
|
|
| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 16:39:34 IST
|
|
|
heres another one.......
#include <iostream.h> class integer { int m, n; public : integer(int, int); // constructor declared void display(void) { cout << " m = " << m << "\n"; cout << " n = " << n << "\n"; } }; integer::integer(int x, int y) // constructor defined { m = x; n = y; } main() { integer int1(0, 100); // implicit call integer int2 = integer(25, 75); // explicit calls cout << "\nOBJECT1" << "\n"; int1.display( ); cout << "\nOBJECT2" << "\n"; int2.display( ); }
|
............................................................................................................................................................................................
There's Light at the end of every Tunnel, so KEEP MOVING....
Best of luck to all my mates....
............................................................................................................................................................................................
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
|
|
|
|
|
|
|