Hi, i'm a student and i needed help in storing all my information from C to a text file. Could anyone help me out.
Thank you
Jollyyy100 0 Junior Poster in Training
Recommended Answers
Jump to PostThis is the C forum. Do you believe that we don't deal with C problems? ;)
One look around the place should have enlightened you on that point. Post your code, and describe what the problem is - tell us what it is that has you stumped.
Jump to Post@OP
>>"is it really getting saved in a text file and how can i view it?"
Open the file :)
Since you have not specified the path explicitly, it generally gets created in the same directory as the source file or sometimes the executable.Just open it …
Jump to PostYour code doesn't show any closure for the file you created. That can cause a problem.
Add:
fclose(ofp);
when your program is done writing data to the file. That will flush out any data that hasn't been written yet to the file, that is being held by …
All 9 Replies
Adak 419 Nearly a Posting Virtuoso
Jollyyy100 0 Junior Poster in Training
myk45 48 Posting Whiz
Jollyyy100 0 Junior Poster in Training
vinitmittal2008 37 Junior Poster
Jollyyy100 0 Junior Poster in Training
Jollyyy100 0 Junior Poster in Training
vinitmittal2008 37 Junior Poster
Adak 419 Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.