#include <iostream> #include <string> using namespace std; struct T { string s[50]; }; bool operator==(string & s, T & t) { int i(0); while (i != 50) if (s == t.s[i++]) return true; return false; } int main() { string s("ff"); T t; t.s[20] = "ff"; cout << (s == t); }