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

  • Home
  • SEARCH
  • 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 9295937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:43:30+00:00 2026-06-18T21:43:30+00:00

I am writing a program that generates simulated user input, and have created a

  • 0

I am writing a program that generates simulated user input, and have created a class to do this. When I try to build it in code::blocks with gcc it throws an error saying “error: ‘INPUT’ does not name a type”. Can someone please explain why I am receiving this error. Below is the header file where the error occurs

#ifndef INPUTSIMULATOR_H
#define INPUTSIMULATOR_H
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
#include <Winuser.h>

enum type{KEYBOARD,MOUSE};
enum button{LEFT,RIGHT,MIDDLE};
class inputSimulator
{
public:
    inputSimulator(type _inputType);
    virtual ~inputSimulator();
    int generateKeyEvent (int vk);
    int generateMouseButtonDown(button eventType);
    int generateMouseButtonUp(button eventType);
    int generateMouseMovement(int dy, int dx);
protected:
private:
    INPUT input; //error occurs here
    type inputType;
};

#endif

Edit: I found another instance of the same issue, but there is no resolution. https://stackoverflow.com/questions/7222529/input-structure-in-simulating-actions-in-winapi

  • 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-18T21:43:31+00:00Added an answer on June 18, 2026 at 9:43 pm

    I can’t reproduce this problem. When I include windows.h (which, by the way, you should always include directly, instead of winuser.h or wingdi.h), the INPUT structure is correctly declared and defined just as it should be.

    Something is wrong with your Windows headers. The same thing clearly happened to that other person. You’re probably both using Code::Blocks or something that provides its own re-implementation of the Windows headers. They either omit the definition of the INPUT structure or hide it inadvertently.

    I recommend downloading and installing the latest version of the Windows SDK, or the Windows 7 SDK, directly from Microsoft. That should solve your problem, unless the hiding of the INPUT structure is occurring in your own project. Ensure that you’re not defining a preprocessor macro with the same name on the command line (or via your IDE’s option for doing the same).

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

Sidebar

Related Questions

Im writing a program that should read input via stdin, so I have the
I'm writing a program that lets the user input 6 temperature readings, and then
I'm writing a C program that parses input from STDIN into words, generates a
I am writing a program that generates a single large table of information. The
I am writing a program that generates excel reports, currently using the Microsoft.Interop.Excel reference.
I have been writing a program that is quite complex compared to what I
I'm learning Go by writing a program that generates files in Collada format, which
I am writing a Python program that generates a C++ program. There are a
I am writing a multi-threaded Java program that generates lot of random numbers. Additional
I am writing a program that generates standard alias names per table name. In

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.