any in sight would be helpful. im really under the gun and have been trying to get this to work for a couple of days.
thanks in advance
David
With what? You didn't mention anything was wrong. Did you read the post titled Read Me: Read This Before Posting ?
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
Try commenting your code. That would tell you quite a lot, if you comment exactly.
Based on your code:
if ((input = fopen("infile", "r")) !=NULL) // open the file
{
while ((fileInput = fgetc(input)) != EOF) // read a single character
{
strcpy(input, word); // copy WORD into INPUT
putchar(fileInput); // Output the character read
fillArray(word);
}
You never did anything with thesingle character you read. And you never read any more than that.
Isn't INPUT a file designator? Does strcpy() work on such an item? Look it up. I know your compiler complained about that.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944