This is a code that I have been working on with the help of some other people. The code compiles and runs properly, and it puts the basic information into the output file. However, this program is supposed to count the 3, 4, 5, and 6 letter words and place those in the output file yet it yields a result of zero each time. I've checked over the code, closed down Visual and reopened it, and tried a couple other things, but I'm at a loss now. Can anyone see any reason while this code fails to count the 3, 4, 5, and 6 letter words and ouput the totals in a new file? Thank you for any help.
#include <iostream> // for cout, endl
#include <iomanip> // for setw() and setprecision()
#include <fstream> // for ifstream and iostream
#include <string>
using namespace std;
int main ()
{
ifstream inData ;
ofstream outData ;
int count1 ;
int count3 = 0 ;
int count4 = 0 ;
int count5 = 0 ;
int count6 = 0 ;
char inChar ;