Skip to content

Instantly share code, notes, and snippets.

@AcnodeLabs
Last active September 12, 2017 04:58
Show Gist options
  • Save AcnodeLabs/8ab9eb9d41c1d4cdb5f36c80e00ba3c2 to your computer and use it in GitHub Desktop.
Save AcnodeLabs/8ab9eb9d41c1d4cdb5f36c80e00ba3c2 to your computer and use it in GitHub Desktop.
cpp starter file in out
#include <stdio.h>
char line[1024];
void operateOnFiles(FILE* fin, FILE* fout) {
printf("Files Ok..\n");
while (!feof(fin)){
fgets(line, 1024, fin);
printf("%s", line); // Start Here
}
}
int main(int argc, char** argv) {
FILE* f = fopen("input.csv", "rb+");
if (f) {
FILE* o = fopen("output.csv", "w+");
operateOnFiles(f,o);
fclose(o);
fclose(f);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment