title: Splitting the string using boost::algorithm::split
body: <p>i have the following code. </p>
  
  <pre><code>using namespace std;
  using namespace boost;
  int main()
  {  
   SystemConnect hndl;
   int ip1[15],ip2[15];
   string line;
   while (cout&lt;&lt;"LP&gt;" &amp;&amp; getline(cin,line) ) {
    if (line=="exit")
     break;
    if (line=="Connect 10.172.21.121 10.109.12.122"){
     string str;
        str="ConInit 10.172.21.121 10.109.12.122";
     vector&lt;string&gt; results;
     split(results,str,is_any_of(" "));
     for(vector&lt;string&gt;::const_iterator p=results.begin();p!=results.end();p++){
      cout&lt;&lt;*p&lt;&lt;endl;
     }
    }
   }
  }
  </code></pre>
  
  <p>This is the Output i am getting.</p>
  
  <pre><code>Connect
  10.172.21.121
  10.109.12.122
  </code></pre>
  
  <p>I need to store 10.172.21.121 in ip1 &amp; 10.109.12.122 in ip2. How do i do that</p>
  
  <p>Thanks</p>