title: How to check for keywords in a string c++
body: <p>I'm trying to figure it out how to check some keywords in a string. This is the case. I'm getting a line from a file and i save it into a temp string. I have an array of strings with the type of keywords i'm looking for. For example, two keywords are begin and end, apart from a bunch of if statements to check every character, is there any other method to do it? 
  My issues are the numbers of if and else that i'll get for every keyword i have, so i want a more efficient way of doing it
  c++</p>