you "could" use a string container, using find()
Code:
#include <iostream>
#include <string>
int main ( void )
{
std::string phrase = "this is the 10th line on page 234";
if (phrase.find("234"))
{
std::cout << "The phrase is in the string" << std::endl;
}
std::cin.get();
return 0;
}
This is just one way, if you know STL constianers, you could use a iterator to search througth
the string and indicate if it can find the numbers or words you are after, remeber to use a constant iterartor though, it is much safer.
Please keep in mind this is only one way to acheive the result, other members may or will have
better ways to solve the problem, I hope I was helpful.
ps - Iterator set up:
Code:
std::vector < std::string > phrase;
std::vector < std::string >::const_iterator myIterator;
std::vector < std::string >::iterator iter;