ok,
arrayListType.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#ifndef H_arrayListType
#define H_arrayListType
#include <string>
#include <iomanip>
class arrayListType
{
public:
bool isEmpty() const;
bool isFull() const;
int listSize() const;
int maxListSize() const;
void print() const;
bool isItemAtEqual(int location, int item) const;
virtual void insertAt(int location, int insertItem) = 0;
virtual void insertEnd(int insertItem) = 0;
void removeArt(int location);
void RetreiveAt(int location, int& retItem) const;
virtual void replaceAt(int location, int repItem) = 0;
void clearList();
virtual int seqSearch(int searchItem) const = 0;
virtual void remove(int removeItem) =0;
arrayListType(int size = 100);
arrayListType (const arrayListType& otherList);
virtual ~arrayListType();
protected:
int *list;
int length;
int maxSixe;
};
#endif
|
Error Codes:
arrayListType.cpp: In member function `bool arrayListType::isFull() const':
arrayListType.cpp:12: error: `maxSize' undeclared (first use this function)
arrayListType.cpp:12: error: (Each undeclared identifier is reported only once for each function it appears in.)
arrayListType.cpp: In member function `int arrayListType::maxListSize() const':
arrayListType.cpp:22: error: `maxSize' undeclared (first use this function)
arrayListType.cpp: At global scope:
arrayListType.cpp:26: error: prototype for `int arrayListType::print() const' does not match any in class `arrayListType'
arrayListType.h:19: error: candidate is: void arrayListType::print() const
arrayListType.cpp:26: error: `int arrayListType::print() const' and `void arrayListType::print() const' cannot be overloaded
arrayListType.cpp: In member function `int arrayListType::print() const':
arrayListType.cpp:28: error: `cout' undeclared (first use this function)
arrayListType.cpp:29: error: `endl' undeclared (first use this function)
arrayListType.cpp: In member function `bool arrayListType::isItemAtEqual(int, int) const':
arrayListType.cpp:36: error: `cout' undeclared (first use this function)
arrayListType.cpp:37: error: `endl' undeclared (first use this function)
arrayListType.cpp: At global scope:
arrayListType.cpp:46: error: no `void arrayListType::removeAt(int)' member function declared in class `arrayListType'
arrayListType.cpp: In member function `void arrayListType::removeAt(int)':
arrayListType.cpp:48: error: `cout' undeclared (first use this function)
arrayListType.cpp:49: error: `endl' undeclared (first use this function)
arrayListType.cpp: In member function `void arrayListType::RetreiveAt(int, int&) const':
arrayListType.cpp:62: error: `cout' undeclared (first use this function)
arrayListType.cpp:63: error: `endl' undeclared (first use this function)
arrayListType.cpp: In constructor `arrayListType::arrayListType(int)':
arrayListType.cpp:77: error: `cout' undeclared (first use this function)
arrayListType.cpp:78: error: `endl' undeclared (first use this function)
arrayListType.cpp:80: error: `maxSize' undeclared (first use this function)
arrayListType.cpp:87: error: expected `;' before '{' token
arrayListType.cpp:90: error: no matching function for call to `arrayListType::arrayListType()'
arrayListType.h:43: note: candidates are: virtual arrayListType::~arrayListType()
arrayListType.cpp:91: error: expected `;' before '{' token
arrayListType.cpp:95: error: cannot allocate an object of type `arrayListType'
arrayListType.cpp:95: error: because the following virtual functions are abstract:
arrayListType.h:37: error: virtual void arrayListType::remove(int)
arrayListType.h:35: error: virtual int arrayListType::seqSearch(int) const
arrayListType.h:31: error: virtual void arrayListType::replaceAt(int, int)
arrayListType.h:25: error: virtual void arrayListType::insertEnd(int)
arrayListType.h:23: error: virtual void arrayListType::insertAt(int, int)
arrayListType.cpp:95: error: expected primary-expression before '(' token
arrayListType.cpp:95: error: expected primary-expression before "const"
arrayListType.cpp:96: error: expected `;' before '{' token
arrayListType.cpp:104: error: expected `}' at end of input
make.exe: *** [arrayListType.o] Error 1
Execution terminated