It's actually not correct to call this a matrix, because it may not have the same number of columns in each row. The correct term would be jagged array. This also means that you cannot create it as a...
Did you not get any comments/feedback from your teacher? If not, then check your results with another student or with another implementation, e.g. in a spreadsheet. Find out where any difference...
C++ is not just object oriented; it's multi-paradigm. Procedural and generic programming is also fully supported by C++. There are many C++ libraries that are header-only, notably the Boost...
Most of these are good guidelines. The second (header guards) could be replaced by using "#pragma once" if it is supported on all target compilers. This avoids the hassle of having to come up with...
The code looks quite good (I didn't look in detail), but there are a couple of issues.
You do not check if the user input is valid, i.e. you check the value, but not the type. See Why does my...
Seems to me that you want to communicate too much with a pointer. It should communicate ownership and 'out' parameters, but it is also the only (descent) way to have optional function parameters....
It's good design to separate user interface from business logic in your application. Displaying (intermediate) results is user interface; calculating them is business logic, in this case.
For the...
Your program is ill-formed. According to the standard, you are not allowed to assign to the result of a const_cast when the original is defined as const. "Casting away const" just means that you are...
Why are you asking someone else these questions if you didn't answer them yourself?
Really, it's not that hard to understand that you can do better than "it doesn't work". The only sensible response...
The struct keyword is not necessary in C++ to define a variable of type 'print'.
What you are trying to do here is to convert a const char[] to a CString*. That's not possible, because these are...
If you want to avoid the default generated copy constructor (or copy assignment operator), all you need to do is declare it private and do not define it. This way you will get either an access...
Why do you want to have a const and a non-const overload of your copy constructor? I'm not even sure that will compile, but I certainly can't see how it could be useful.
For that matter, why do you...
Yes, when you have a factory it is good practice to return a smart pointer (either shared_ptr if you need reference counting or (normally) a unique_ptr).
The major difference between a reference and a pointer is that a pointer can point to NULL and you can change what a pointer points to. Neither is possible with a reference.