Compile Errors != Linker Errors, BTW why do I get Linker errors?

It is good discipline to design the class in .hpp with all function prototypes and when complete copy it to .cpp so that you have no mismatch.
Plan B: 1 member function at a time
1. create mf in .hpp
2. body of mf in .cpp
3. Test mf in main()
4. GOTO 1
 
No as in we are not going to do it? or No as in we are not doing it now but looking into it?


Good question.

If there is enough demand, for sure. But outside the context of the QN C++ course which is large as it is.

If you have suggestions I am all ears:)
 
To misquote Edsger Dijkstra:

"unit testing only proves the presence of bugs, not absence thereof"

:)
 
People can spend a lot of time debuggimg while if you take the time to do code inspection you can see the error at a glance.


template
<typename T> // Array declared as template type T

Array<T>::Array(
const Array<T>& source)

{
// Copy Costructor

size = source.size;
for (int i=0;i<size;i++)

m_data = source.m_data;
}
 
Last edited:
Back
Top Bottom