Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for newbiewwcode

Hi All, Private data in a class can only be accessed by getter functions. If I have a class as the private data in another class, in another class...Example: class Top { private: class Middle { private: class Bottom { private: int number; } } } If I want to …

Member Avatar for NathanOliver
0
133
Member Avatar for newbiewwcode

Hi, I am trying to design a vector within a vector within a vector. For example, a school has 3 floors, each floor has 5 classrooms, each classroom has 20 students, each student has a last name and a first name. I know how to create a vector for floors …

Member Avatar for tinstaafl
0
688
Member Avatar for newbiewwcode

Member Access Operators: . and -> http://msdn.microsoft.com/en-us/library/b930c881.aspx I read the above article and played around with some codes. I thought line 25 and 26 would work but they didn't. Can you guys please tell me why? Thanks for helping! #include <iostream> using namespace std; class State { private: int* state; …

Member Avatar for newbiewwcode
0
199
Member Avatar for newbiewwcode

Can you guys please help me understand when to use const? For example, if I have the following functions: viod add (int* array) { int total = array[1] + array[2]; } viod subtract (int* array); viod times (int* array); viod divide (int* array); viod printArray(int* array); and I only intend …

Member Avatar for newbiewwcode
1
203
Member Avatar for newbiewwcode

it's a beginner's problem. I am trying to calculate sum of the first 15 factorials. I know int isn't large enough for the sum, so I used unsigned long long but it still didn't work. why?? Thanks for helping! #include <iostream> #include <cmath> #include <iomanip> #include <cstring> using namespace std; …

Member Avatar for Ancient Dragon
0
356