Hello what would be the best way to return a pair<> via a structure Let me further explain. Below is the type of struct that I want to use:
//compass.h
struct Compass {
pair<int, int> C;
pair<int, int> E;
pair<int, int> W;
pair<int, int> NE;
pair<int, int> NW;
pair<int, int> SE;
};
Compass GetCompass()
{
C = make_pair(3,4);
bla bla bla
}
I would like to call C in my main file:
main()
{
V GetCompass();
J = V.C.first;
K = V.C.second;
}
What I would like to do is call this function and retrieve the value of C??? Any ideas??