Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7867045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:36:06+00:00 2026-06-03T00:36:06+00:00

I’m am attempting to create a vector of arrays from inputting files and then

  • 0

I’m am attempting to create a vector of arrays from inputting files and then loading the vector into my main. I am also attempting to use the same vector throughout my program. When I compile, however, I get a bunch of Error LNK2019s. I think I have an idea as to where this is happening but I am unsure as to why. Could someone help or explain? Thanks!

     #include <iostream>
     #include <string>
     #include <vector>
     #include "Database.h"
     #include "Registration.h"
     #include "Competition.h"
     #include "Events.h"
     #include "CompPop.h"
     #include "PushRegistration.h"
     using namespace std;

     void main()
     {
         vector<Competition> myVector = CompPop();
         vector<Registration> myRegistration = PushRegistration();
         Database home(myVector, myRegistration);

         home.Menu();

         system("pause");
     }

Seems to occur at:
1. vector < Competition > myVector
2. vector< Registration> myRegistration

and these are the error messages I am getting

error LNK2001: unresolved external symbol “public: __thiscall Registration::~Registration(void)” (??1Registration@@QAE@XZ)

and

error LNK2001: unresolved external symbol “public: __thiscall Database::~Database(void)” (??1Database@@QAE@XZ)

My Compop header, reads from a file and stores the contents into a vector of Competition (similar to my PushRegistration header)

      #pragma once

     #include <fstream>
     #include <sstream>
     #include <iostream>
     #include <string>
     #include <vector>
     #include "LogIn.h"
     #include "Registration.h"
     #include "Events.h"
     #include "Competition.h"
     using namespace std;

     vector<Competition> CompPop()
     {
         ifstream myfile("PSU Results.txt");

         string line, tcomp, tleader, tfollower, tevents, tplacement;
         vector<Competition> info;
         if(myfile.is_open())
         {
             int i = 0; // finds first line
             int n = 0; // current vector index
             int space;
             while(!myfile.eof())
             {
                 getline(myfile,line);

                 if(line[i] == '*')
                 {
                     space = line.find_first_of(" ");

                     tleader = line.substr(0+1, space);
                     tfollower = line.substr(space + 1, line.size());

                 }
                 else
                 {
                     if(line[i] == '-')
                     {
                         tcomp = line.substr(1, line.size());
                         Competition temp(tcomp, tleader, tfollower);
                         info[n] = temp;
                     }
                     else
                     {
                         if(!line.empty())
                         {
                             line = line;

                             space = line.find_first_of(",");
                             tevents = line.substr(0, space);
                             tplacement = line.substr(space + 2, line.size());
                             info[n].pushEvents(tevents,tplacement);
                         }
                         if(line.empty())
                         {
                             n++;
                         }
                     }
                 }
             }
         }
         else
         {
             cout << "Unable to open file";
        }

         myfile.close();

         return info;
     }

My Competition Header (Similar to my Registration header):

     #pragma once

     #include <fstream>
     #include <sstream>
     #include <iostream>
     #include <string>
     #include <vector>
     #include "LogIn.h"
     #include "Registration.h"
     #include "Events.h"
     using namespace std;

     struct Competition
     {
     public:

        Competition(string compName, string lead, string follow)
         {
            Name = compName;
            Leader = lead;
             Follower = follow;
         }

         void pushEvents(string name, string place)
         {
             Events one(name, place);
             Eventrandom.push_back(one);
         }

         string GetName()
         {
            return Name;

         }

         string GetLeader()
         {
            return Leader;
         }

         string GetFollow()
         {
            return Follower;
         }

         string GetEvent()
         {
            return Event;
         }

         string GetScore()
         {
            return Score;
         }

         void Print()
         {
             cout << "Leader: " << Leader << endl;
             cout << "Follower: " << Follower << endl;
            cout << "Competition: " << Name << endl;
             cout << "Events and Placement: " << endl;

             for(vector<Events>::iterator pos = Eventrandom.begin(); pos !=                      Eventrandom.end(); ++pos)
             {
                 cout << pos->eventName << " " << pos->Placement << endl;
             }

             cout << endl;
         }

         ~Competition();

     private:
        string Name, Leader, Follower, Event, Score;

         vector<Events> Eventrandom;
     };

My Registration header:

     #pragma once

     #include <iostream>
     #include <string>
     #include <fstream>
     using namespace std;

     #define MAX_LENGTH 7 
     #define MAX_DANCES 9

     class Registration
     {
     public:

         Registration();

         Registration(string confirmationCode, string follower, string leader, string comp, string level, string dance);

         void FirstTime();

         void infoFollower();

         void infoLeader();

         string gen_random(const int len);

         string Levels();

         string Dances();

         void Print();

              void print2Confirmation();

         ~Registration();

     private:

         string CCode, Follower, Leader, Name;
         string Level, Dance;

     };
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:36:09+00:00Added an answer on June 3, 2026 at 12:36 am

    The error messages are pretty clear.

    unresolved external symbol “public: __thiscall
    Registration::~Registration(void)”

    Registration::~Registration(void) is the destructor of the Registration class. Have you defined one?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am currently running into a problem where an element is coming back from
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.