Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

how can i save contents of an operation to an output file which name is "output.in"?

is it right?

C
#include <stdio.h>
#include <stdlib.h>

int main ( void )
{
    FILE * Output;
    Output = fopen("output.in", "a");
    fprintf(Output, "data");
    fclose(Output);
    return 0;
}
Posted
Updated 1-Dec-12 22:32pm
v3
Comments
Richard MacCutchan 2-Dec-12 3:19am    
What you are doing is correct, but it may not actually be what you want. What information are you trying to save?
lida zar 2-Dec-12 3:23am    
cmd information to an outpu.in file
Richard MacCutchan 2-Dec-12 3:34am    
You really need to provide much more detail than a few cryptic words stuck together. What sort of information, in what format, what do you expect to do with this information after you have written it etc?

1 solution

 
Share this answer
 
Comments
lida zar 2-Dec-12 3:08am    
not help me friend ... other solutions ... i did something and now i wanna save it to a .in file ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900