Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Writing a file using C

Posted on 2012-03-23
3
Medium Priority
?
255 Views
Last Modified: 2012-08-13
Attached is a file I am using to write read from one file and write to another.  Below is what is printed on the screen with the printf statement that is in the while loop.  Using the fputc command can I expect the information is going to the output file.  If the number 176 is printed on the screen I need 176 to go to the output file and not an ASCII equivalent.
THANKS!

176 0 0 176 32 115 192 27 186 0 0 186 32 114 202 27 176 7 100 186 7 69 240 67 16 76 2 1 2 0 247 240 67 16 76 2 1 0 1 16 247 186 91 36 240 67 16 76 2 1 34 0 247 240 67 16 76 2 1 32 66 0 247 176 93 35 240 67 16 76 2 1 34 0 247 240 67 16 76 2 1 32 66 0 247 186 93 70 240 67 16 76 2 1 64 6 0 247 240 67 16 76 2 1 90 1 247 240 67 16 76 2 1 86 64 247 240 67 16 76 2 1 87 64 247 176 94 40 240 67 16 76 8 0 17 127 247 186 94 0 240 67 16 76 8 10 17 127 247 177 94 0 240 67 16 76 8 1 17 127 247 240 67 16 76 2 1 74 0 87 247 240 67 16 76 2 1 12 64 247 240 67 16 76 2 1 13 64 247 240 67 16 76 2 1 2 0 247 240 67 16 76 2 1 0 1 16 247 176 91 28 184 0 127 184 32 0 200 0 185 0 127 185 32 0 201 0 240 67 16 76 48 42 5 20 247 240 67 16 76 48 46 5 20 247 240 67 16 76 48 51 5 40 247 240 67 16 76 48 36 5 0 247 240 67 16 76 48 51 4 73 247 184 7 55 184 91 45 185 7 76 178 7 88 179 7 65 179 10 100 179 91 40 179 93 35 179 0 0 179 32 127 195 27 180 7 65 180 10 100 180 91 40 180 93 20 181 7 55 181 0 0 181 32 127 197 49 182 7 71 182 10 70 182 91 42 182 93 0 182 0 0 182 32 127 198 0 183 7 66 183 10 20 183 91 40 183 93 10 183 0 0 183 32 127 199 25 240 67 126 1 0 27 16 28 247 240 67 16 76 2 1 0 1 17 247 240 67 16 76 2 1 12 64 247 240 67 16 76 2 1 13 64 247 240 67 16 76 2 1 12 64 247 240 67 16 76 2 1 13 64 247 240 67 16 76 2 1 2 0 247 240 67 16 76 2 1 0 1 17 247 176 91 28 240 67 16 76 2 1 32 65 0 247 240 67 16 76 2 1 44 64 247 240 67 16 76 2 1 45 64 247 240 67 16 76 2 1 44 64 247 240 67 16 76 2 1 45 64 247 240 67 16 76 2 1 34 0 247 240 67 16 76 2 1 32 65 0 247 176 93 35
midiio.c
0
Comment
Question by:sargent240
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Infinity08 earned 2000 total points
ID: 37760101
If you want the output file to be exactly like what you get on standard output, why not use fprintf instead of fputc ?
0
 

Author Comment

by:sargent240
ID: 37760652
let me check it out.  Thanks for the response, I'll let you know.
0
 

Author Closing Comment

by:sargent240
ID: 37774946
That's a keeper, Thanks!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Six Sigma Control Plans
Progress

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question