#include #include #include using namespace std; void print(vector v) { if (v.empty()) { cout << "found no matches" << endl; } else { for (int i =0; i < v.size() ; i++) { cout << v[i] << endl; } } } int match (string a, string b, vector m) { cout << "reached match function" << endl; for (int y = 0; y < a.size(); y++) { cout << y << endl; if ((a.at(y) != b.at(y)) && (a.at(y) != '?')) { cout << "letters not match" << endl; return -1; } } m.push_back(b); return 0; } int searchFull(string list[], vector v, string target, int m) { int i = 0; int j; while (i < m) { if (list[i].size() == target.size()) { cout << "size match" << endl; j = match(target, list[i], v); } i++; } } int main() { vector myvector; string m[5] = { "test", "test", "test", "test", "test" }; searchFull(m, myvector, "test", 5); print(myvector); system("pause"); return 0; }