Hi!
I have tried to pass an index of a string vector as parameter and haven't found anything on the internet useful.
I am trying to implement a DFA and I want to access a string at a specific index.
Thx
1 2 3 4 5 6 7 8 9 10 11 12 13 14
vector <string>lines
void AFD::start(int i, vector <string>lines.at(i)) {
for (string &str : lines) {
for (char &ch : str) {
it = std::find(lines.begin(), lines.end(), "a");
if (it != lines.end()) {
dfa = 1;
}
else {
dfa = -1;
}
}
}