#include <iostream>
#include <seqan/index.h>

using namespace std;
using namespace seqan;

int main ()
{
    Index< String<char> > index_esa("tobeornottobe");
	Finder< Index< String<char> > > finder_esa(index_esa);

	cout << "hit at ";
	while (find(finder_esa, "be"))
		cout << position(finder_esa) << " ";
	cout << endl;

	typedef Index< String<char>, Index_QGram< FixedShape<2> > > TQGramIndex;
    TQGramIndex index_2gram("tobeornottobe");
	Finder< TQGramIndex > finder_2gram(index_2gram);

	cout << "hit at ";
	while (find(finder_2gram, "be"))
		cout << position(finder_2gram) << " ";
	cout << endl;

	return 0;
}
