Try
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <string> vw;
for(;;)
{
string word;
cin >> word;
if ( ! cin ) break;
vw.push_back(word);
}
for (const auto & w : vw)
cout << w << endl;
cout << "no. oof words: " << vw.size() << endl;
}
To get the input from your text file, redirect the standard in, e.g.
showwords.exe < C:\Users\Mio\Desktop\ciao.txt
(assuming
showwords.exe
is the name of the executable).