Code:
int first=0;
int last= StandardSize-1;
int mid=(first+last)/2;
//cout<<MyWords.size()<<endl;
for (int i=0; i<MyWords.size();i++)
{
while(first<=last)
{
if(MyWords[i]>Standard[mid].substr())
first=mid+1;
int first=0;
int last= StandardSize-1;
int mid=(first+last)/2;
//cout<<MyWords.size()<<endl;
for (int i=0; i<MyWords.size();i++)
{
while(first<=last)
{
if(MyWords[i]>Standard[mid].substr())
first=mid+1;
// SpanishBreakPredict.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; #include <fstream>
char* SortedArray[]=
{
"a base de",
"a continuaci\xF3n",
"a diferencia de",
for(unsigned i=0;i<Standard.size();i++)
{
for(unsigned j=0;j<MyWords.size();j++) //each MyWords compare to the Standard
//and see if it is in the standard vector
{
string::size_type FoundAt=MyWords[i].find(Standard[j]);
while( string::npos != FoundAt )
int count=0;
ReadWord.open("file.txt");
while(!ReadWord.eof())
{
ReadWord.getline(MyWord, MAXLENGTH);
count+=ReadWord.gcount();
ReadWord.open("file.txt");
Leave a comment: