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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:07:51+00:00 2026-06-12T07:07:51+00:00

I am new to class templates and am having trouble. I have a function

  • 0

I am new to class templates and am having trouble. I have a function that doesn’t declare (ie. to be an int, double etc). But it doesn’t make sense to declare in this function. Therefore I am getting errors. Thanks for the help.

I have the following function:

bool QueType<ItemType>::IsEmpty() const
// Returns true if there are no elements on the queue and false otherwise.
{
    return (front == NULL);
}

This returns the following errors:

Error 1 error C2065: ‘ItemType’ : undeclared identifier
Error 2 error C2955: ‘QueType’ : use of class template requires template argument list
Error 3 error C2509: ‘IsEmpty’ : member function not declared in ‘QueType’

  • 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-12T07:07:51+00:00Added an answer on June 12, 2026 at 7:07 am

    I think you’re looking for:

    template <typename ItemType>
    bool QueType<ItemType>::IsEmpty() const
    // Returns true if there are no elements on the queue and false otherwise.
    {
        return (front == NULL);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hallo I have this script: <? require(lib2/config.inc.php); require(lib2/tpl.class.php); require(lib2/db.class.php); require(lib2/um.class.php); $tpl = new template(templates,
I am having trouble correctly modeling related objects that can use templates. This is
When I create a new class file in Flex 3 it warns me that
I'm creating a new class that inherits from UIView. I remember that xcode 3
I am trying to create a new class Dog that inherits via prototypical inheritance
I have subclassed UIViewController into a new class, PageViewController (I'm writing a simple book
I'm new to Symfony2 (with knowledge in 1.2-1.4) and having little trouble trying to
I have a template class ArrayTemp that creates an array of pointers to type
I'm having trouble starting a Service to update an AppWidget that I'm creating as
I am new to extjs and I am having trouble when feeding a template

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.