title: C++ program to accept multiples inputs and put in an array using pointer
body: <p>there's a problem facing me in this question :
  "write a c++ console program to accept five 
  integers values from keyboard in one line separated by spaces . the program then stores the five values in an array using pointer . then print the elements of the array on the screen ."</p>
  
  <p>I tried to make a string variable and accept 5 integers from user then convert it to integer but it doesn't work well because it doesn't take numbers after space . </p>
  
  <p>any help guys ?? </p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;string&gt;
  #include&lt;sstream&gt;
  
  using namespace std;
  
  int main(){
      string numbers;
      getline(cin, numbers);
      int arr[5];
      int *ptr;
      int values;
      stringstream convert(numbers);
      convert &gt;&gt; values;
      cout &lt;&lt; values;
  
  
  }
  </code></pre>