Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I don't know why this happens to me. Can anyone give me some suggestions? 38 39 40 41 42 43 44 45 46 47 48
I don't know why this happens to me. Can anyone give me some suggestions?
38 39 40 41 42 43 44 45 46 47 48 class ElectoralMap{ public: static const int district Number = 1; static ElectoralMap& initialization(){ static ElectoralMap electoral; return electoral; } District get_district(int id); ElectoralMap(ElectoralMap const&) delete; void operator=(ElectoralMap const&) = delete; friend ostream& operator::iterator it; for (it districts.begin(); it != districts.end(); itt) { ossecond) districts; 60 61 62 63 }; 64 65 #endif // !ELECTORALMAP_HPP PROBLEMS 1 OUTPUT DEBUG CONSOLE TERMINAL W460239957@DESKTOP-Q068R3R:/mnt/h/3010/Hw3$ ^C W460239957@DESKTOP-Q068R3R:/mnt/h/3010/Hw3$ make g++ -std=cH17 -Wall -c ElectoralMap.cpp ElectoralMap.cpp: In member function District ElectoralMap::get_district(int)': ElectoralMap.cpp:34:1: warning: no return statement in function returning non-void [-Wreturn-type] 34 |} I ElectoralMap.cpp: In function 'std::string enunToString(Parties)': ElectoralMap.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type] 19 |} g++ -std=CH17 -Wall main.cpp ElectoralMap.o -o main /usr/bin/ld: ElectoralMap.o: in function 'ElectoralMap::ElectoralMap()': ElectoralMap.cpp:(. text+0x1cb): undefined reference to 'ElectoralMap::districts' /usr/bin/ld: ElectoralMap.o: in function 'ElectoralMap::get_district(int)': ElectoralMap.cpp:(.text+0x242): undefined reference to 'ElectoralMap::districts' collect2: error: ld returned 1 exit status make: *** [Makefile:10: main] Error 1 w460239957@DESKTOP-2068R3R:/mnt/h/3010/Hw3$ ElectoralMap::ElectoralMap({ cout::iterator it; it - districts.find(id); } 38 39 40 41 42 43 44 45 46 47 48 class ElectoralMap{ public: static const int district Number = 1; static ElectoralMap& initialization(){ static ElectoralMap electoral; return electoral; } District get_district(int id); ElectoralMap(ElectoralMap const&) delete; void operator=(ElectoralMap const&) = delete; friend ostream& operator::iterator it; for (it districts.begin(); it != districts.end(); itt) { ossecond) districts; 60 61 62 63 }; 64 65 #endif // !ELECTORALMAP_HPP PROBLEMS 1 OUTPUT DEBUG CONSOLE TERMINAL W460239957@DESKTOP-Q068R3R:/mnt/h/3010/Hw3$ ^C W460239957@DESKTOP-Q068R3R:/mnt/h/3010/Hw3$ make g++ -std=cH17 -Wall -c ElectoralMap.cpp ElectoralMap.cpp: In member function District ElectoralMap::get_district(int)': ElectoralMap.cpp:34:1: warning: no return statement in function returning non-void [-Wreturn-type] 34 |} I ElectoralMap.cpp: In function 'std::string enunToString(Parties)': ElectoralMap.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type] 19 |} g++ -std=CH17 -Wall main.cpp ElectoralMap.o -o main /usr/bin/ld: ElectoralMap.o: in function 'ElectoralMap::ElectoralMap()': ElectoralMap.cpp:(. text+0x1cb): undefined reference to 'ElectoralMap::districts' /usr/bin/ld: ElectoralMap.o: in function 'ElectoralMap::get_district(int)': ElectoralMap.cpp:(.text+0x242): undefined reference to 'ElectoralMap::districts' collect2: error: ld returned 1 exit status make: *** [Makefile:10: main] Error 1 w460239957@DESKTOP-2068R3R:/mnt/h/3010/Hw3$ ElectoralMap::ElectoralMap({ cout::iterator it; it - districts.find(id); }Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started