title: Finding the names of class when c++ code in used as an input
body: <p>I want to get the name of all the classes from C++ code (using textbox)</p>
  
  <p>I'm trying something like this:</p>
  
  <pre><code>if (text.ToLower().Contains("class")){
      string[] splitText = text.Split(new char[] { ' ' });
      classindex = Array.FindIndex(splitText, r =&gt; r.Contains("class"));
      string className = splitText[classindex + 1];
      MessageBox.Show(className);
  }
  else{
      MessageBox.Show("class not found");
  }
  </code></pre>
  
  <p>I'm only getting the name of first class</p>