Question on my code
here is my program that read a file and push_back to the vvector and I have this error could you please correct me what part I am wrong?
Many thanks,
Elahe
Error
=====
C:\C++\sample.cpp(15) : error C2784: 'class std::basic_ostream<_E,_Tr> &__cdecl std::operator <<(class std::basic_ostream<_E,_Tr> &,const short *)' : could not deduce template argument for 'class std::basic_ostream<_E,_Tr> &' from 'int'
Code
======
//: C02:GetWords.cpp
// Break a file into whitespace-separated words
#include <string>
#include <fstream>
#include <vector>
using namespace std;
int main() {
vector<string> words;
ifstream in("Fillvector.cpp");
string word;
while(in >> word)
words.push_back(word);
for(int i = 0; i < words.size(); i++)
cout << words[i] << endl;
} ///:~

