Question: C++ Help - Template Stack Using Linked List I am getting this error when I try to compile the code MyStack stack; int x=9; stack.push(x);

C++ Help - Template Stack Using Linked List

I am getting this error when I try to compile the code

MyStack stack;

int x=9;

stack.push(x);

stack.pop(x);

Error

Undefined symbols for architecture x86_64:

"MyStack::pop(int)", referenced from: _main in main.o "MyStack::push(int const&)", referenced from: _main in main.o

"MyStack::MyStack()", referenced from: _main in main.o

"MyStack::~MyStack()",referenced from: _main in main.o

ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!