что то вроде:
Код:

#include "stdafx.h"
#include <iostream>
#include <string>
#include <fstream>
#include <cstring>
using namespace std;
int main()
{
ofstream out("test", ios::binary);
char str[] = "bla bla bla bla . ble ble ble ble ble. blu blu blu blu. blo blo blo.";
out.write(str,strlen(str));
out.close();
ifstream in("test", ios::binary);
if(!in) {
cout << "File didn't open\n";
return 1;
}
char ch;
string word;
cout << "Input word: ";
cin >> word;
string s;
while(!in.eof()) {
in.get(ch);
if(ch=='.') {
if(s.find(word)!=-1) cout << s << endl;
else cout << "No 8(\n";
s.erase(0);
}
s=s+ch;
}
in.close();
return 0;
}