title: Read an input line by line and convert to vector and print
body: <p>Trying to input exactly the following data containing <code>14</code> urls in <code>7</code> lines.</p>
  
  <pre><code>google.com gmail.com
  google.com maps.com
  facebook.com ufl.edu
  ufl.edu google.com
  ufl.edu gmail.com
  maps.com facebook.com
  gmail.com maps.com
  </code></pre>
  
  <p>via <code>cin</code> and store each URL as a vector and print just the unique vectors like this in <code>c++</code> : </p>
  
  <pre><code>1 google.com
  2 gmail.com
  3 facebook.com
  4 maps.com
  5 ufl.edu 
  </code></pre>
  
  <p>So far I have done following code but it's not printing the <code>vector</code>.</p>
  
  <pre><code>int main()
  {
    vector&lt;string&gt; Urls;
    std::string urls;
    std::getline(std::cin, urls); // get first line
    std::istringstream iss(urls);
    std::string word;
  
    while (std::getline(std::cin, urls)) {
        std::cout &lt;&lt; urls &lt;&lt; "\n";
        Urls.push_back(word);    
    }
  
    for(int i =0; i &lt;Urls.size(); i++) {
       cout &lt;&lt;Urls[i]&lt;&lt;endl;
    }
  }
  </code></pre>