Print? 01 ./*
02. * copyright and version Declaration of the program
03. * Copyright (c) 2012, a student from the computer College of Yantai University
04. * All rightsreserved.
05. * file name: class. cpp
06. * Author: Wang liqiang
07. * completion date: January 1, April 7, 2013
08. * version: v1.0
09. * input Description: omitted
10. * Problem description: omitted
11. * program output: omitted
12 .*/
I
# Include <iostream>
# Include <stdlib. h>
Using namespace std;
Class C
{Private:
Int x;
Public:
C (int x) {this-> x = x ;}
Int getX () const {return x ;}
};
Int main ()
{Const C c (5 );
Cout <c. getX () <endl;
Return 0;
}
II
# Include <iostream>
# Include <stdlib. h>
Using namespace std;
Class C
{Private:
Int x;
Public:
C (int x) {this-> x = x ;}
Int getX () {return x ;}
};
Int main ()
{C c (5 );
Cout <c. getX () <endl;
Return 0;
}
01 ./*
02. * copyright and version Declaration of the program
03. * Copyright (c) 2012, a student from the computer College of Yantai University
04. * All rightsreserved.
05. * file name: class. cpp
06. * Author: Wang liqiang
07. * completion date: January 1, April 7, 2013
08. * version: v1.0
09. * input Description: omitted
10. * Problem description: omitted
11. * program output: omitted
12 .*/
I
# Include <iostream>
# Include <stdlib. h>
Using namespace std;
Class C
{Private:
Int x;
Public:
C (int x) {this-> x = x ;}
Int getX () const {return x ;}
};
Int main ()
{Const C c (5 );
Cout <c. getX () <endl;
Return 0;
}
II
# Include <iostream>
# Include <stdlib. h>
Using namespace std;
Class C
{Private:
Int x;
Public:
C (int x) {this-> x = x ;}
Int getX () {return x ;}
};
Int main ()
{C c (5 );
Cout <c. getX () <endl;
Return 0;
}