Hi,I spent all night trying to figure this out. Could someone take a look and show me what I'm missing? I getting this compiler error: unterminated #ifndef . But I have ifndef at the beginning and endif at the end of the class.
//Header file.
//Class definition for teh stack ADT
#ifndef _mystack_H
#include <ostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define _mystack_H
const unsigned int maxSize = 10;
class Stack
{
public:
Stack(); //constructor
~Stack(); //Destructor
bool isEmptyStack();
bool isFullStack();
void pushStack(int newItem);
void popStack(int item);
void initializeStack();
void fillStack(int numSize);
void exchangeTopAndBottom(Stack &stk);
void printStack(Stack &stk);
int sumStack(Stack &stk);
void OddElem(Stack &stk);
//void commonStack(Stack &stk1, Stack &stk2);
void intersectStack(Stack &stk1, Stack &stk2);
private:
int maxSize; //variable to store the maximum stack size
int stackTop; //variable to poit to the top of the stack
Stack arrList;//pointer to the array that holds the stack
//elements
};
#endif