Subj : Re: How to in C or C++....? To : borland.public.cpp.borlandcpp From : maeder@glue.ch (Thomas Maeder [TeamB]) Date : Sat Aug 09 2003 12:18 pm "Ed Mulroy [TeamB]" writes: > ------------------ > #include > #include > : > char buf[132]; // buffer to receive the line dataq > char *p; // pointer used for searching > FILE *fp = fopen("filename.txt", "r"); // open the file in text mode > > fgets(buf, sizeof(buf), 1, fp); // read the line in Could it be that you mixed the prototypes of fgets() and fread() here? fgets() only takes three arguments; I'd call it like this: fgets(buf, sizeof(buf), fp); .