Question: I suddenly got a compiler error message says the following: /usr/bin/ld: /tmp/ccYM4KZU.o: in function `main': main.cpp:(.text+0x23): undefined reference to `Election::Election()' collect2: error: ld returned 1
I suddenly got a compiler error message says the following:
/usr/bin/ld: /tmp/ccYM4KZU.o: in function `main': main.cpp:(.text+0x23): undefined reference to `Election::Election()' collect2: error: ld returned 1 exit status make: *** [Makefile:10: main] Error 1
This happens when I try to declare an Election object. I did not have this problem before. Can't figure out why because I believe my Election object should not need a user-defined constructor. The object only has a vector of candidates as the private data member


![1 exit status make: *** [Makefile:10: main] Error 1 This happens when](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa690d8a41d_92566fa690d37b53.jpg)
class Election public: Election(); void Registration(int,string); candidate getCandidate(int); void campaign(ElectoralMap&,int,int); private: vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
