title: Printing out the content of train and test set from my dataset in c++
body: <p>I am trying to print out the content of both train and test sets, i need the proper line of codes to do this, please help</p>
  <pre><code>void split_dataset(int perc_train,
      vector&lt;vector&lt;float&gt;&gt;&amp; vec_X_dataset, vector&lt;int&gt;&amp; vec_Y_dataset,
      vector&lt;vector&lt;float&gt;&gt;&amp; vec_X_train, vector&lt;int&gt;&amp; vec_Y_train,
      vector&lt;vector&lt;float&gt;&gt;&amp; vec_X_test, vector&lt;int&gt;&amp; vec_Y_test) {
      size_t len = vec_X_dataset.size();
      size_t len2 = vec_Y_dataset.size();
      size_t len3 = vec_X_train.size();
      size_t len4 = vec_X_test.size();
      size_t division = static_cast&lt;size_t&gt;(len * (perc_train * 0.01));
      vector&lt;float&gt; data_point;
      for (size_t i = 0; i &lt; len; ++i) {
          if (i &lt; division) {
              vec_X_train.push_back(vec_X_dataset[i]);
              vec_Y_train.push_back(vec_Y_dataset[i]);
              
                     }
          else {
              vec_X_test.push_back(vec_X_dataset[i]);
              vec_Y_test.push_back(vec_Y_dataset[i]);
          }
              
      }
  
      cout &lt;&lt; &quot;len:&quot; &lt;&lt; len &lt;&lt; &quot;  &quot; &lt;&lt; &quot;len2:&quot; &lt;&lt; len2 &lt;&lt; &quot;  &quot; &lt;&lt; &quot;division:&quot; &lt;&lt; division &lt;&lt;&quot;  &quot; &lt;&lt;&quot;len3:&quot;&lt;&lt; len3 ;
      cout&lt;&lt; &quot;len4:&quot; &lt;&lt; len4 &lt;&lt; endl;
  }
  </code></pre>