This topic is now archived and is closed to further replies.

C++ Reading from a txt file

This topic is 5017 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok I can write to a file fine, but when trying to read i get stuck can anyone enlighten me as to what im doing wrong?
if (!= true)
	while (!(infile.eof()))
			infile >> FoodID;
			if (strcmp(FoodID,"Dairy")==0)
			if (strcmp(FoodID,"Fruit")==0)
			if (strcmp(FoodID,"Meat")==0)
			system ("pause");
			//FoodID[0] = '\0';


[edited by - justaddwater on March 18, 2004 3:33:30 AM]

Share this post

Link to post
Share on other sites