-
-
Save cmb69/40c8c3f40795d9032aec49d13e452fa5 to your computer and use it in GitHub Desktop.
Write email to disk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) | |
{ | |
FILE *out; | |
char c; | |
if (argc != 2) { | |
return 1; | |
} | |
if (!(out = fopen(argv[1], "w"))) { | |
return 1; | |
} | |
while ((c = getchar()) != EOF) { | |
putc(c, out); | |
} | |
fclose(out); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment