Files in cpp | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Files in cpp

Hello guys! I am currently running a program in c++. My program has multiple files, however, two of my files are declared as "first defined here" or "undefined reference to vtable..." even though I have included them. What can I do so the program runs normally?

23rd Jul 2019, 9:15 PM
MargK645
4 Answers
+ 1
MargK645 you can place your code on code playground with multiple file as multiple codes and copy the link of code from code playground nd share only that link in comment section over here. coming to your question, it seems you might have missed to define body for atleast one of the pure virtual function... check that virtual destructor is also having body defined for it
24th Jul 2019, 2:34 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Can you show me the code? Maybe I can help
23rd Jul 2019, 10:22 PM
Agent_I
Agent_I - avatar
0
Agent_I thank you for responding but I'm afraid that I can't include it here since it's too long
23rd Jul 2019, 10:34 PM
MargK645
0
MargK645 You don't have to post everything, just the important parts, where the problems are
23rd Jul 2019, 10:46 PM
Agent_I
Agent_I - avatar