#include <iostream>
#include <cstdlib>
#include <fstream>
#include <string>
using namespace std;




int _tmain(int argc, _TCHAR* argv[])
{
string stopwords[50] = {"to","the","a","an","from","with"};
string words;
string z = " ";
string removestop;
char ch;
fstream fp("doc.txt", ios::in);
if (!fp)
{
cerr << "File can not open!" << endl;
exit(1);
}
int j = 0;
while (fp >>words )
{
cout <<words;
}

cout << words<<endl;
{


سلام من یه کد مثل بالا نوشتم فایل doc متنیم توش نوشته i have a book و وقتی اولین بار words چاپ میشه متن کاملا درسته ولی تو دومی cout فقط کلمه یbook چاپ میشه و نمیشه از کل جمله استفاده کرد
.لطفا اشتباهم رو بگید