C++ Error: SDL_JoyStick has not been declared

I am using SDL 2 and I am trying to write a void function that accepts an argument of SDL_Joystick. However, I am getting a compiler error saying that the variable has not been declared. I have included SDL.h, so I do not know why this is happening. Here is a code excerpt with the error line:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//worlds.h
#ifndef WORLDS_H_INCLUDED
#define WORLDS_H_INCLUDED

#include "game.h" // contains SDL.h

class World1
{
    public:
       //more code above
       void mainLoop(SDL_Renderer*&, SDL_JoyStick*&);
       //more code below
};

#endif // WORLDS_H_INCLUDED 


SDL.h is in game.h, which is included in the above file. Using SDL_Renderer has worked fine, so why is SDL_Joystick not working?
You need to spell SDL_Joystick with a lowercase s.
Topic archived. No new replies allowed.