Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

harvardgal2103

I want to write my output of a c code into a file using mapviewoffile in C. Can anyone help please. I have already checked the google links available. I am stuck. So, it would be really helpful if u can give a small example.

  • one year ago
  • one year ago

  • This Question is Open
  1. yoshuajoe
    Best Response
    You've already chosen the best response.
    Medals 0

    map view of file, what does it mean ? such as Directory Viewer ?? if the one that you meant is Directory Viewer, you can try WINAPI in Win32 Env..

    • one year ago
  2. harvardgal2103
    Best Response
    You've already chosen the best response.
    Medals 0

    No! mapviewoffile is a function in c through which you can map a part of the file or memory and write to or read from it.

    • one year ago
  3. agdgdgdgwngo
    Best Response
    You've already chosen the best response.
    Medals 1

    If you are writing to stdout, you can use the shell to redirect output to an arbitrary file like `./mapviewoffile > output.txt'. Otherwise, you might be able to use the FILE objects and the fopen, fclose, fprintf, etc.

    • one year ago
  4. rsmith6559
    Best Response
    You've already chosen the best response.
    Medals 1

    Don''t foget fflush() !

    • one year ago
  5. yoshuajoe
    Best Response
    You've already chosen the best response.
    Medals 0

    As I know but if you use the fflush() to clear stdin buffer, it would be cleared and it doesn't show the output

    • one year ago
  6. agdgdgdgwngo
    Best Response
    You've already chosen the best response.
    Medals 1

    actually, fflush(stdin) is undefined behavior

    • one year ago
  7. rsmith6559
    Best Response
    You've already chosen the best response.
    Medals 1

    Actually, I was referring to between fprintf() and fclose() in agdgdgdgwngo's reply.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.