Oh, duh.
void ClassTwo::showData(ClassOne & classOneobj)
{
classOneobj.getData();
}
Thank you.
One last question:
int main() {
ClassTwo dummy;
dummy.showData();
return 0;
}
dummy.showData(); wants parameters passed into it. What would they be?
Parameters with data types like strings...
void classTwo::showData(ClassOne & classOneobj)
{
cout << m_SomeData;
}
My compiler wants me to declare m_SomeData in classTwo because it's giving me an undeclared identifier error. I thought passing in parameters (ClassOne & classOneobj) was suppose to eliminate the need to do that...?
Homework Statement
see #3Homework Equations
N/A
The Attempt at a Solution
I'm working on this assignment and I got stuck at this part in programming here's what I need to do:
I need to find a way to have one object access the data members of another object.
A broken down/simplified version...
It definitely encourages cramming which doesn't help in the long run. A student can just ditch every class meeting until the final where they only show up to take the test. They can do a week's worth of cramming and pass the final but it's likely they'll forget what they were tested on.
If...
I think you're being a bit too pessimistic about the situation by making such extreme comparison. A brother who ditches their goals to live at home and game is problematic because such a person is not bringing in income for the family while is being another mouth to feed. (I'm assuming you're...
Homework Statement
*v and u are vectors where ||u|| is the magnitude of u and ||v|| is the magnitude of v
Prove that ||u + v|| = ||u|| + ||v|| if and only if u and v have the same direction.
Homework Equations
The Attempt at a Solution
At first, I tried using what it means for...
I understand what you mean now. I didn't quite pick up on that after the first reply, though that was what HallsofIvy was getting at. Thanks for pointing me in the right direction guys. Looks like I have some work to redo.
Ah, I forgot about that. Truth is, the entire question asks
"Prove that if a matrix A is idempotent (A^2 = A), then the determinant of A is either 0 or 1."
However, I was able to prove that the det(A) is 1 with a different method, which is why I neglect to mention it in this problem; I was...
I finished this problem but I'm not sure if what I did was mathematically legal. This is a homework problem but I'm hesitant to turn it in the way it is since it's worth a lot of points. If someone can confirm what I did is correct or incorrect, I'd really appreciate it, thanks!
Homework...