From: Sumanta B <sum...@gm...> - 2016-03-27 16:27:42
|
Guys why are you still using devc++. Use visual studio and get rid of all errors On Fri, Mar 18, 2016 at 2:59 PM, mofana mphaka <mo...@nu...> wrote: > There must be corresponding > #if... > > before your > > #endif // LinkedQueue_H > > > > > >> 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 > >> > >> > > --- > ------------------------------------------- > mofana mphaka > Mathematics and Computer Science Department > National University of Lesotho > LESOTHO > > mailto:mof...@gm...; cc: mo...@nu... > http://cs.nul.ls/~mofana > Cell: (+266) 63167562 > Office: (+266) (5221)3518 > Home: (+266) 27058532 > --------------------------------------------------------------------------- > > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |