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 482643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:07:01+00:00 2026-05-13T01:07:01+00:00

The following is based on the code that I posted on this thread .

  • 0

The following is based on the code that I posted on this thread. Aside from the obvious bugs, I get the following compilation errors? Any idea why?

The odd thing is that this only occurs for the template class. If I add another non template class to the same .h and .cpp file of the template class and try to instantiate just the non template class, no error is generated.

Scenario A:

I get the compilation error ” error C2659: ‘=’ : overloaded function as left operand ” for the following code:

StdVector<int> a();
StdVector<int> b();
a = b;

Scenario B:

I get the compilation error ” error C2664: ‘__thiscall StdVector::StdVector(const class StdVector &)’ : cannot convert parameter 1 from ‘class StdVector (__cdecl *)(void)’ to ‘const class StdVector &’ ” for the following code:

StdVector<int> a();
StdVector<int> b(a);

Scenario C:

I get the compilation error “error LNK2001: unresolved external symbol “public: __thiscall StdVector::~StdVector(void)” (??1?$StdVector@H@@QAE@XZ) ” for the following code:

StdVector<int> a;
  • 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-13T01:07:01+00:00Added an answer on May 13, 2026 at 1:07 am

    If I am not mistaken, templates cannot be exported. That is why I am getting the linker error in Scenario C.

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

Sidebar

Related Questions

Gday All, The following code displays a div based on the option that has
Suppose that one has some lock based code like the following where mutexes are
I sometimes get the following exception: COM object that has been separated from its
I'm dealing with a large code base that uses the following construct throughout class
I am currently running the following code based on Chapter 12.5 of the Python
I have the following HTML code based on a tab menu format, i.e: <div
In the following code, the stack-based variable 'ex' is thrown and caught in a
I have the following code in WCF service to throw a custom fault based
My question is concerning SQL connection status, load, etc. based on the following code:
Consider the following base code: (function($) { $.fn.myPlugin = function(settings) { return this.each(function() {

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.