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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:49:17+00:00 2026-05-31T02:49:17+00:00

I been following a tutorial word for word but i get an error which

  • 0

I been following a tutorial word for word but i get an error which I couldn’t get the answer solved from the guy who made the tutorial!

I got to this section of the tutorial which is where it went wrong:
http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition-Part-6.aspx

The error i get is:

playerpaddle.cpp(32): error C2039: 'IsKeyDown' : is not a member of 'tagINPUT'
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winuser.h(5332) : see      declaration of 'tagINPUT'

playerpaddle.cpp(36): error C2039: 'IsKeyDown' : is not a member of 'tagINPUT'
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winuser.h(5332) : see declaration of 'tagINPUT'

playerpaddle.cpp(40): error C2039: 'IsKeyDown' : is not a member of 'tagINPUT'
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winuser.h(5332) : see declaration of 'tagINPUT'

1>c:\users\dave\c++\pang\playerpaddle.cpp(54): error C2064: term does not evaluate to a function taking 1 arguments

With this script section:

void PlayerPaddle::Update(float elapsedTime)
{
if(Game::GetInput().IsKeyDown(sf::Key::Left))
{
    _velocity-=3.0f;
}
if(Game::GetInput().IsKeyDown(sf::Key::Right))
{
    _velocity+=3.0f;
}
if(Game::GetInput().IsKeyDown(sf::Key::Down))
{
    _velocity = 0.0f;
}

if(_velocity > _maxVelocity)
    _velocity = _maxVelocity;

if(_velocity < -_maxVelocity)
    _velocity = -_maxVelocity;

sf::Vector2f pos = this->GetPosition();

if(pos.x <= GetSprite().GetSize().x/2 ||
    pos.x >= (Game::SCREEN_WIDTH - GetSprite().GetSize().x/2))
{
    _velocity = -_velocity;
}

GetSprite().Move(_velocity * elapsedTime, 0);
}

I attached my project for some one to take a look at:
http://tinyurl.com/7evajju

  • 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-31T02:49:19+00:00Added an answer on May 31, 2026 at 2:49 am

    The GetInput() static in Game is returning a windows struct. Pretty sure that’s not what you wanted as that struct has only data and no methods. This function isn’t actually implemented, so if you ‘just make the errors go away’, you’ll still have a linker error for an undefined symbol.

    You see it as ‘_tagINPUT’ as an effect of how windows typedef declares structures.

    You probably intended to return a ‘Input’ class as defined in include\SFML\Window\Input.hpp

    I believe you would typically call GetInput() on the SFML Window class.

    So maybe all you wanted was game.h to instead have:

    const sf::Input& GetInput() { return _mainWindow.GetInput(); }
    

    I think you would do well to focus on C++ as a language before diving so deep into game programming. If game programming is all you are interested in, you may want to look into higher level technologies that will let you make games. Going down the C/C++ road without investing in understanding the language is likely to cause you enough pain that you will end up hating what you are doing, which would be unfortunate.

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

Sidebar

Related Questions

I've been following a tutorial from a recent edition of the Linux Journal which
I'm new to NHibernate... I have been following this NHibernate Tutorial from Gabriel Schenker
I have been following javascript tutorial from www.w3school.com and while reading one of the
I am new to Ajax and have been following a tutorial from JQuery.com. I
I've been following the tutorial at http://iphonebyradix.blogspot.com/2011/03/read-and-write-data-from-plist-file.html showing how to extract data from a
I have been following this tutorial, http://ruby.railstutorial.org/chapters/modeling-users?version=3.2#top , which I find great, but it
I've been following this tutorial - http://www.youtube.com/watch?v=R2hOvZ7bwXU , which explains how to use postMessage
I've been following the tutorial from msdn and it just doesn't work. First problem
I've been following the django tutorial over at https://docs.djangoproject.com/en/dev/intro/tutorial03/ but I've hit a brick
I've been following this tutorial on msdn which loads a custom configSection. http://msdn.microsoft.com/en-us/library/system.configuration.configurationcollectionattribute.aspx I'm

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.