Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <iostream>
- #include <vector>
- using namespace std;
- struct position
- {
- int x;
- int y;
- };
- class Box
- {
- public:
- position currentPosition;
- };
- int main(int argc, const char * argv[])
- {
- Box box1 = Box();
- Box box2 = Box();
- Box box3 = Box();
- Box box4 = Box();
- Box box5 = Box();
- Box box6 = Box();
- Box box7 = Box();
- Box box8 = Box();
- Box box9 = Box();
- // vector<vector<Box>> boxes2dVector;
- //
- vector<vector<Box>> boxes2dVector =
- {
- {box1, box2,box3},
- {box4, box5,box6},
- {box7, box8,box9}
- };
- return 0;
- }
- position getPositionOfBox (Box box)
- {
- position resultPositon;
- /*
- This is what I need...some code that finds the position in the of a Box object in side a 2d array
- */
- return resultPositon;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement