#include "CS35lib.h"

int main()
{
	int counter, i, number;
	char the_file[250], entry[200];

	ifstream file_to_open;

	cout<<"Whats name of file? ";
	cin>>the_file;

	file_to_open.open(the_file);
	counter = 0;
	cout<<"The message u worte is: ";
	while (file_to_open>>entry)
	{
		cout<<" "<<entry<<" ";
		for (i=0; i <strlen(entry) ; i++)
		{
			entry[i];
				counter++;		
		}
			
	}
	cout<<endl;
	cout<<"That had "<<counter<<" chars.";
	cout<<"Which would u like to see? ";
	cin>>number;
	cout<<"The chara in posi "<<number<<" is "<<entry[number];
	cout<<endl;
	cout<<"Starting from there, the messeafe is: ";
	for (i= number+1; i< strlen(entry) ;i++ )
	{
		cout<<entry[i];
	}
	cout<<endl;
	file_to_open.close();
	return 0;

}
