BACKGROUND and SYSTEM:
I am using DEV-C++ on Windows XP to create an old-styled text-RPG as a console application. I am soley self-studying from the "C++ All-In-One Desk Reference For Dummies."
PROBLEM:
I can't find any clear reference to searching an array, or a vector.
I want to determine if a string is present, and if so return the array location as an int.
PURPOSE:
I am trying to compare user input to a list of strings representing plausible exits from the player's "room" and then move to the corresponding location in a "matching" vector of classes. This process would later be placed in a function.
///This is roughly what it looks like now. I have to compare Action to each possible exit one at a time, so I have an if/else if for every potential exit, which feels sloppy.
What I would do is instead make a vector of rooms, and simply have an array of exits that have the room number. Then you can just set the players "current room #" to whatever room they are in, and then look in that room for the desc, etc.