am trying to determine if a string contains a quoted substring.
This is my code that gives me a compile error: "ai3.cpp:162:37: warning: character constant too long for its type"
Code:
//if the line contains 'class="wikitable"'
string findString = 'class="wikitable"';
size_t pos = str.find(findString);
if (pos != string::npos) {
cout << "Substring found at position " << pos << endl;
}
I've tried:
Code:
"'class=\"wikitable\"'"
but str.find doesn't find my substring.
So, can anyone suggest how I may search for the presence of a quoted substring?