I want to write a structure through which I can loop. For this I added two methods begin and end which would return begin, end values of an already existing vector. What return type should I specify, and will these two methods be enough to make MATCH structure work in my context? Here's what I've got so far:
typedef std::pair<std::string, std::string> combo;
struct MATCH {
std::vector<combo> matches;
? begin() { return matches.begin(); }
? end() { return matches.end(); }
};
int main() {
MATCH m = { ... };
for (const combo& i : m)
...;
}