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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:43:22+00:00 2026-05-22T15:43:22+00:00

I get 5 errors at the following snippet of code 4 of the errors

  • 0

I get 5 errors at the following snippet of code

4 of the errors are

expected unqualified-id before ‘(‘
token|

and 1 error

‘GetEntityIterator’ was not declared
in this scope|

GetEntityIterator() returns vector<*Entity>::iterator EntityIterator

GetAABB() returns an AABB

I can post more code if needed

    void Bomb::CreateExplosion(Game_Manager* EGame_Manager)
    {
    BombTexture->LoadTexture("Bomb.bmp");
    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);

    for(int iteration = 1; iteration <= 3; iteration++)
    {
        if(this->GetAABB()->CheckForCollision(this->GetAABB(), EGame_Manager->getEntityManager()->(*GetEntityIterator())->GetAABB()) == true)//check for collision against the unbreakable blocks or player and does what is necessary for each
        {
            if(EGame_Manager->getEntityManager()->(*GetEntityIterator())->GetType() == unbreakableblock)
            {
             break;
            }
            else if(EGame_Manager->getEntityManager()->(*GetEntityIterator())->GetType() == player)
            {
                EGame_Manager->getEntityManager()->(*GetEntityIterator())->GetLives() -= 1;
            }

        }
        else
        glBegin(GL_QUADS);
            glColor4f(   1.0f,    0.0f, 0.0f, 0.0f); //color red
            glTexCoord2f(0.0, 0.0); //uv coordinates
            glVertex3f( -2.0f + x,2.0f  + y,  0.0f); //top left
            //----------------------------------------------------
            glColor4f(   0.0f,    1.0f, 0.0f, 0.0f); //color green
            glTexCoord2f(1, 0.0 ); //uv coordinates
            glVertex3f(  2.0f + x,2.0f  + y,  0.0f); //top right
            //----------------------------------------------------
            glColor4f(   0.0f,    0.0f, 1.0f, 0.0f); //color blue
            glTexCoord2f(1, 1);
            glVertex3f( 2.0f + x, -2.0f + y,  0.0f); //bottom right
            //----------------------------------------------------
            glColor4f(   1.0f,    1.0f, 0.0f, 0.0f); //color red
            glTexCoord2f(0.0, 1); //uv coordinates
            glVertex3f(-2.0f + x, -2.0f + y,  0.0f); //bottom left
        glEnd();
    }

    glDisable(GL_TEXTURE_2D); //disable 2d textures

}
  • 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-22T15:43:23+00:00Added an answer on May 22, 2026 at 3:43 pm

    Maybe because of this syntax:

    getEntityManager()->(*GetEntityIterator())
    

    ?

    I’m not sure what you were trying to do, but the -> operator is supposed to be followed by the name of a member of the class.

    Edit

    After reading iaamilind’s comment, I finally think I understand what you were trying to do. You were trying to dereference the iterator, but then you still had to dereference the pointer (Entity*) it returned, so the -> operator was not enough. You’re correct that you have to use parentheses and the * operator – but you’ve put them in the wrong place. This is what you should do:

    (*EGame_Manager->getEntityManager()->GetEntityIterator())->GetType()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code snippet.. I get the error Expected identifier, string or
We get the following error; The request was aborted: Could not create SSL/TLS secure
I get the following error message in SQL Server 2005: User '<username>' does not
Hi currently I'm trying to get following snippet of code to work: function Entry()
I have the following code snippet that produces a compilation error: public List<string> batchaddresses;
Can anyone explain why I get the following errors when compiling the code shown
For the following header I get the same two errors on all my sitemaps.
Why do I get following error when trying to start a ruby on rails
I get the following error when running my Visual Studio 2008 ASP.NET project (start
I get the following error when building my Windows Forms solution: LC.exe exited with

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.