RSS Forums RSS
Please support our C++ advertiser: Programming Forums

how do I have txt file be read by the compiler?

Join Date: Aug 2005
Posts: 4,844
Reputation: iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light iamthwee is a glorious beacon of light 
Rep Power: 17
Solved Threads: 325
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Industrious Poster

Re: how do I have txt file be read by the compiler?

  #2  
Oct 28th, 2007
Hello,

Firstly, you need to surround your code with [code][/code] tags.

You shouldn't be using eof to control file input because it has a bug.

To read in a line use getline or something like that.
Last edited by iamthwee : Oct 28th, 2007 at 6:37 pm.
*Voted best profile in the world*
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:28 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC