Joined
Last Seen
-6 Reputation Points
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
0 Endorsements
Ranked #44.2K
Plz explain the advantage of using inner classes? |
|
[code=cplusplus] #include<iostream.h> #include<conio.h> using namespace std; class Array { private: int* ptr; int size; public: Array() :ptr(0), size(0) { } Array (int s) : size(s) { ptr= new int[s]; } Array(Array&); ~Array() { delete[] ptr;} int& operator [] (int j) { return *(ptr+j); } Array& operator = (Array&); }; // … |
|
is there any disadvantages of objects as class members. If yu know plz share with me |