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

  • Home
  • SEARCH
  • 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 6237735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:05:10+00:00 2026-05-24T11:05:10+00:00

main cpp file: #include <iostream> #include <cstdio> #include table.h using namespace std; int main()

  • 0

main cpp file:

#include <iostream>
#include <cstdio>

#include "table.h"

using namespace std;

int main() {

    Table test;

    int i;
    for(i = 0; i < 26; i++) {
        cout << test.start[2] << endl;
    }

    system("PAUSE");
    return 0;
}

header file:

#pragma once


class Table {
    public:
        char start[26];

        Table();
        Table(char key[26]);

        ~Table();
};

cpp file:

#include "table.h"


Table::Table() {
    char start[26] = "ABCDEFGHIJKLMNOPRSTUVWXYZ";
}

Table::Table(char key[26]) {

}

errors im getting :

1>playfair.obj : error LNK2019: unresolved external symbol "public: __thiscall Table::~Table(void)" (??1Table@@QAE@XZ) referenced in function _main

1>c:\Users\Jansu\Documents\Visual Studio 2010\Projects\playfair\Debug\playfair.exe : fatal error LNK1120: 1 unresolved externals

so basically i googled a lot and do not know what to do. i found some answers but i tried them and did not help

for example i tried to add additional dependencies, but i had all of them already added.

help me please, why does the error come?

  • 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-05-24T11:05:10+00:00Added an answer on May 24, 2026 at 11:05 am

    Although the header defines Table as having a dtor, the cpp file only contains a couple of constructors — not a destructor. Given that there seems to be nothing for your destructor to do (you haven’t allocated any dynamic memory or anything like that) you probably just want to remove the declaration of Table::~Table(); and be done with it. While you’re at it, you probably want to make Table::start private. I’d also change the parameter to a char const * instead of using array notation:

    class Table {
            char start[26];
        public:
            Table();
            Table(char const *key);
    };
    

    Once you’re done dealing with that, you’ll need to deal with the fact that Table::Table() defines a local variable named start, and initializes it, but leaves Table::start uninitialized, which I doubt is what you wanted/intended.

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

Sidebar

Related Questions

I have the main .cpp file with this: #include stdafx.h #include Form1.h #include <iostream>
These are my files: --------[ c.hpp ]-------- #ifndef _C #define _C #include<iostream> class C
I am developing a GUI app on WinXP but unfortunately std::cerr/cout goes nowhere. I
I am trying to implement hash_multimap in C++. Here is the code: #include <hash_map>
I am trying to compile my first c++ file on windows with the g++
Hey all. I've downloaded and moved the Xerces (v3.1.1) source here: /usr/include/xerces and I
Here's my simple first attempt at a python extension using boost. Can someone help
I want to count all the instances of derivers from my class, I'm trying
I am a beginner in C++ I am average at C. I have written
I am unable to figure out why my code is not able to open

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.