|
From: pwm <pw...@ia...> - 2016-03-12 12:25:05
|
So are you including your queue header file before the second header file?
Next thing - This is a dead forum for a product that hasn't been updated
in many years. Consider switching to a recent version of Code::Blocks
instead.
/Per W
On Sun, 18 Mar 2007, Von Baetiong wrote:
> I am using Dev C++ version 4.9.9.2 w/ Windows XP. I am writing a program for class that requires me to use inheritance. Below is
> the header files for the base class and the derived class.
>
> BASE CLASS:
>
> #include<iostream>
> #include<iomanip>
> #include<stdlib.h>
>
> using namespace std;
>
> #include "Node.h"
>
> class Queue
> {
> protected:
> NodePtr Front;
> NodePtr Rear;
> int Count;
> void QueueError(char* Mesg);
> public:
> Queue();
> ~Queue();
>
> void displayAll();
> void addRear(int item);
> void deleteFront(int& item);
> int getSize();
> bool isEmpty();
> bool full();
> };
>
> #endif // LinkedQueue_H
>
> DERIVED CLASS:
>
> #ifndef LinkedList_H
> #define LinkedList_H
>
> #include<iostream>
> #include<iomanip>
> #include<stdlib.h>
>
> using namespace std;
>
> class LL: public Queue
> {
>
> public:
> void addFront(int NewNum);
> void deleteRear(int& OldNum);
> int search(int& Key);
> void deleteIth(int I, int& OldNum);
>
> };
> #endif //LinkedList_H
>
> COMPILE LOG:
>
> Compiler: Default compiler
> Building Makefile: "C:\Documents and Settings\Von\Desktop\HW3\Pt2\Makefile.win"
> Executing make...
> make.exe -f "C:\Documents and Settings\Von\Desktop\HW3\Pt2\Makefile.win" all
> g++.exe -c LinkedList.cpp -o LinkedList.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward"
> -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
>
> In file included from LinkedList.cpp:10:
> LinkedList.h:11: error: expected class-name before '{' token
>
> make.exe: *** [LinkedList.o] Error 1
>
> Execution terminated
>
>
> |