Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 28th, 2008, 11:43 PM   #1
starbeam
Newbie
 
Join Date: Jan 2008
Posts: 10
Rep Power: 0 starbeam is on a distinguished road
fopen

I am having to write a program that opens a text file called test.txt and take the information in that file make changes to it and save the canges in a new text file called change.txt

I think I need to use fopen but I am not really sure about how I would go about using that. Everything I try to read about fopen just gets me more lost then I already am.
starbeam is offline   Reply With Quote
Old Feb 28th, 2008, 11:59 PM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Re: fopen

Look into using fstream. Google "C++ fstream".
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Feb 29th, 2008, 12:40 AM   #3
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 598
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: fopen

fopen() is intended for C, not C++, although it can be used in c++ but there are a lot easier ways to do it. Take Infinite's advice and use fstream object.

Here is one of several tutorials
__________________
<<Freelance Programmer>> << Hobby Site>>
Ancient Dragon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
fopen jazz C 9 Jul 19th, 2006 7:43 PM
Compiling Maverik 6.2 (from C) megamind5005 C 16 May 3rd, 2006 6:41 PM
Can't open .REG files with fopen. Stevo C++ 2 Mar 24th, 2005 5:56 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:57 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC