So... I assume you were given (or made yourself) the class unorderedArrayListType.h, right?
And you
#include
it at the top, because you want to use it, of course. Nothing to worry about there.
But still, you're probably getting some errors! ;)
You have this .cpp file, which has the
main
function.
You probably also have unorderedArrayListType.h and unorderedArrayListType.cpp.
Most often the .h file has the definition of the class, and the .cpp file the definitions of its functions. Class definition looks like this:
And what's important is that a class (and anything else, too) can be defined
only once... This is often done in the .h file...
Another important thing to remember is that your program starts in the
main()
function. This is a special function.
And just like how it is with classes, functions also can de defined
only once in the same class. You
can have multiple functions with the same name, but they
must have different parameter lists, so that they are really all different.
Anyway, since
main()
is special, it has to be defined in a specific way. And naturally, it may only be defined once...
There is some more that needs fixing, but this is a start for now. Do things step by step. Fix problems one by one.