0

I am new to c++ and was working with OOP concepts.

I created a header file(account.h), a method definition file(account.cpp) and a main file(ex2.cpp).

When, I am compiling the main file, I am getting an error as "undefined reference to".

The detailed error is:-/tmp/ccps76QE.o: In function `main':
ex2.cpp:(.text+0x8d): undefined reference to `Account::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, double)'
ex2.cpp:(.text+0xb7): undefined reference to `Account::display()'
ex2.cpp:(.text+0xd6): undefined reference to `Account::display()'
ex2.cpp:(.text+0x134): undefined reference to `Account::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, double)'
ex2.cpp:(.text+0x15e): undefined reference to `Account::display()'
ex2.cpp:(.text+0x178): undefined reference to `Account::display()'

.

Kindly help me regarding this issue as I am new to programming and c++

J. Murray
  • 1,460
  • 11
  • 19

0 Answers0