I’m a complete noob when it comes to C++ and I’ve been hacking away on Moai trying to add support for an Xbox 360 gamepad via XInput. When I include the header for XInput there are two options:
- XInput

and
- Xinput

Further, in order to use XInput I need to include windows.h. All the examples I’ve seen use the following syntax:
#include <windows.h>
But the auto complete in Visual C++ Express 2010 inserts
#include <Windows.h>

In the case of XInput/Xinput it seems that case-sensitivity matters but in the case on Windows.h it does not seem to matter.
Does case-sensitivity matter when including header files? Is there some logic to this?
Is the XInput difference simply a matter of there being a header for something called XInput and another something called Xinput?
Case sensitivity in header names and include directives is implementation defined. Generally it works out to whether the platform you’re building on is case sensitive or not.
I’d have to test to make sure, but I suspect that if you type any variety of ‘xinput.h’ it will find the the one that occurs first in the header search paths, even if the file that occurs later in the search paths is a better match in terms of case. This would be quite unintuitive from the perspective of a developer not familiar with these issues, because it would mean that you could use one of those auto-completions, and VS would then include the file not selected.
It’s also possible that VS is smarter than that and will search for the best case match.