View Single Post
Old Jan 10th, 2007, 12:58 PM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Please read about how to post a good question. It's stuck right at the top of the forum.

That said, are you testing the result of the fopen instruction to see if it failed, and if so, why? You can't open a file that doesn't exist. There are a number of other reasons. Did you test to see if cin worked? Your code doesn't show that.

Information is key. For you, and for your potential respondents. Check for errors. See what they mean. Use output statements to see what various values are. Use a debugger. SHARE that information, when you post, and include enough code so that we can see what you're actually doing.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote