For my main, my header file is now
1 2 3 4
|
#include
<iostream>
#ifndef MyStack_h
#endif MyStack_h
|
and for my MyStack
1 2 3 4 5
|
#include <iostream>
#include <cstddef>
#ifndef MyLinkedList_H
#endif MyLinkedList_H
|
error messages now read:
Main:
|4|warning: extra tokens at end of #endif directive [enabled by default]|
||In function 'int main()':|
|8|error: 'MyStack' was not declared in this scope|
|8|error: expected primary-expression before 'char'|
|8|error: expected ';' before 'char'|
|11|error: 'stack' was not declared in this scope|
|15|error: 'stack' was not declared in this scope|
||=== Build failed: 5 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
MyStack:
5|warning: extra tokens at end of #endif directive [enabled by default]|
|13|error: 'MyLinkedList' does not name a type|
||In constructor 'MyStack<T>::MyStack()':|
|25|error: 'list' was not declared in this scope|
|25|error: expected type-specifier before 'MyLinkedList'|
|25|error: expected ';' before 'MyLinkedList'|
||In member function 'T MyStack<T>::pop()':|
|30|error: 'list' was not declared in this scope|
||In member function 'void MyStack<T>::push(T)':|
|37|error: 'list' was not declared in this scope|
||In member function 'bool MyStack<T>::isEmpty()':|
|44|error: 'list' was not declared in this scope|
||=== Build failed: 7 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|