I'm glad you got it working; congrats!
You're using C++, so you should use:
const int MAX_TEXTURES = 50;
You shouldn't use #define, unless you need a #define, which is very rare. Or rather, should be rare if you are coding properly.
Alot of old books and tutorials suggest #define MAX_TEXTURES 50, but that's considered bad practice now.
(this is programming for ya: Everytime you post something, someone will tell you it's outdated and show you a better way. When starting out, this can feel frustrating ("I'm always doing everything wrong!"), but once you get used to it, it's pretty cool, because you are always learning new things, and (almost always) the new things people show you actually are better! )