1
0

testExe3.c 395 B

123456789101112131415161718192021222324
  1. #include <stdio.h>
  2. int main(int argc, const char* argv[])
  3. {
  4. if(argc < 2)
  5. {
  6. fprintf(stderr, "Must specify output file.\n");
  7. return 1;
  8. }
  9. {
  10. FILE* f = fopen(argv[1], "w");
  11. if(f)
  12. {
  13. fprintf(f, "int generated_by_testExe3() { return 0; }\n");
  14. fclose(f);
  15. }
  16. else
  17. {
  18. fprintf(stderr, "Error writing to %s\n", argv[1]);
  19. return 1;
  20. }
  21. }
  22. return 0;
  23. }