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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:52:03+00:00 2026-05-16T07:52:03+00:00

I am trying to understand templates better I have a template class that starts

  • 0

I am trying to understand templates better

I have a template class that starts like this in my .h:

template <class DOC_POLICY, class PRINT_POLICY, class UNDO_POLICY>
class CP_EXPORT CP_Application : public CP_Application_Imp

Now I need to initialize so in my .cpp so I do:

CPLAT::CP_DocumentPolicy_None * d = new CPLAT::CP_DocumentPolicy_None();
CPLAT::CP_PrintPolicy_None * p = new CPLAT::CP_PrintPolicy_None();
CPLAT::CP_UndoPolicy_None * u = new CPLAT::CP_UndoPolicy_None();

CPLAT::CP_Application::Init(d, p, u);

I get an error on CPLAT::CP_Application::Init(d, p, u); that states:

error: ‘template class CPLAT::CP_Application’ used without template parameters

How does one pass template parameters?

  • 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-16T07:52:03+00:00Added an answer on May 16, 2026 at 7:52 am

    I believe it should work

    CPLAT::CP_Application<CPLAT::CP_DocumentPolicy_None,CPLAT::CP_PrintPolicy_None,CPLAT::CP_UndoPolicy_None>::Init(d,p,u);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a url that look like this reg.php?lang=no_NO&passkey=test and im trying to get
Trying to understand Ruby a bit better, I ran into this code surfing the
Im trying to understand how class generics work and this bit just doesnt make
I've been trying to understand template specializations. Why is this generating an error (
I am trying to understand some C++ syntax: template<class T> class Foo { Foo();
I'm trying to understand how the following class template works (taken from here ),
I am trying to understand STL algorithms. Copy is defined as : template<class InputIterator,
I am trying understand ViewModels deeper and I have read many articles and blogs
Trying to understand PNG format. Consider this PNG Image: The Image is taken from
Trying to understand the math of this code snippet. A token is provided which

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.