Starting Out With C++ By Tony Gaddis 7th/8th/9th Edition


Thank you for stopping by my blog on now the 9th version of Starting Out with C++. I appreciate all the support and emails that I have received from all of you. I want to especially thank those that not only used the blog to get help but also contributed possible solutions to help fill in the holes. Remember that this blog is intended to help and you are not doing yourself any favors by simply copying and pasting one of many possible solutions that I found that work on an exercise problem.

I do intend to write more exam/quiz questions to round out the study guide and more of the programming challenges - when I get more time.  I'm a student also so I hope you understand.

I have Java and VisualBasic info that I could post if there is enough interest.  Leave a comment and let me know if it is worth posting or not.  Good luck in your classes!

12/02/2014. After debating whether to post more on the 7th edition, I've decided to start posting the solutions to the exercises from the 8th edition. I didn't buy the myprogramminglab version this time so you might have to adjust your code accordingly. The compiler I use to write the code is the Microsoft VisualStudio C++ compiler in command line mode so that works with the examples in the book.

Please note that this blog is not part of turing's Craft (www.turingscraft.com) and we do not provide the solution manual for the course (codelab) or myprogramminglab.

I really like Tony Gaddis' Starting Out With books so here we go...

Open Help Request

Here is where you can ask your fellow blog visitors for help also. Since we have a lot of visitors you might be able to get at least a pointer on how to tackle a problem. Please post the problem in the comment section and how you attempted to solve it. 

14.2: Friends of Classes 11220

Solution by nowiita

class Window
{
private:
int width;
int height;
public:
Window(int w, int h)
{
width = w;
height = h;
}
friend bool areSameSize (Window, Window);
};
bool areSameSize (Window obj1, Window obj2)
{
bool same = false;
if (obj1.width == obj2.width && obj1.height == obj2.height)
same = true;
return same;

}