Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = getStartLocation(); == this part is in the main.cpp trying to call getStartLocation
- Player is a Location type.
- class World
- {
- public:
- World(string);
- World(const World&);
- Location getStartLocation() const; == this is the world.h file declaration thingermabbober dohickey
- Location World::getStartLocation() const === this is the code in getstartlocation
- {
- string one = ""; // this makes me look smurt
- string two = "";
- string three = "";
- int r1;
- stringstream out;
- stringstream out2;
- for (int i = 0; i < 10; i++)
- {
- for (int j=0; j < 10; j++)
- {
- if (w[i][j] == 1)
- {
- out << i;
- one = out.str();
- out2 << j;
- two = out2.str();
- three = one + two;
- r1 = atoi(three.c_str());
- return r1;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment