All pastes #372641 Raw Edit

Someone

public text v1 · immutable
#372641 ·published 2007-02-26 06:01 UTC
rendered paste body

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

//Create Function
void countWords(int count);
void countCharacters(int charNum);



int main()
{
	int count = 0;
	countWords(count);

	int charNum = 0;
	countCharacters(charNum);


	return 0;
}

void countWords(int count)
{
	
	string temp;
	ifstream countWords( "txtdata.txt" );
	while( countWords >> temp )
	{
		count = count + 1;
	}

	cout << "found " << count << " words" << endl;

}