Category : abstract-data-type

So, in class, we learnt about the implementation of an array abstract data structure, and using the array class we made, we implemented a stack abstract data structure as a class. #include <iostream> #ifndef ARRAYADT1_H #define ARRAYADT1_H using namespace std; class ArrayADT1 { public: ArrayADT1(); ArrayADT1(int); virtual ~ArrayADT1(); bool setElement(int, int); int getElement(int); int getCapacity(); ..

Read more

In class.abstract we can see in the Note 3 that: An abstract class can be used only as a base class of some other class; no objects of an abstract class can be created except as subobjects of a class derived from it ([basic.def], [class.mem]). This rules out the usage of abstract classes as subobjects ..

Read more

I know where error comes from. I have already marked it below the c++ code. I have no idea about this error. Hope someone help me. How to fix this problem? The error is: Undefined symbols for architecture x86_64: "operator<<(std::__1::basic_ostream<char, std::__1::char_traits >&, Stack&)", referenced from: Path(int, int) in main.o ld: symbol(s) not found for architecture ..

Read more