Hello,
I've two examples, directly taken by my C++ manual, with no changes made by me.
You can find the main program file and the header file attached.
When I try to compile the project I have these errors:
Code:
[Linker error] undefined reference to `Stock::Stock(char const*, int, double)'
[Linker error] undefined reference to `Stock::Stock(char const*, int, double)'
[Linker error] undefined reference to `Stock::Stock(char const*, int, double)'
[Linker error] undefined reference to `Stock::Stock(char const*, int, double)'
[Linker error] undefined reference to `Stock::~Stock()'
[Linker error] undefined reference to `Stock::show() const'
[Linker error] undefined reference to `Stock::topval(Stock const&) const'
[Linker error] undefined reference to `Stock::show() const'
[Linker error] undefined reference to `Stock::~Stock()'
[Linker error] undefined reference to `Stock::~Stock()'
[Linker error] undefined reference to `Stock::~Stock()'
[Linker error] undefined reference to `Stock::~Stock()'
ld returned 1 exit status
Can you please help me?
Thank you!