Skip to content

Instantly share code, notes, and snippets.

@shriphani
Created August 10, 2013 11:56
Show Gist options
  • Save shriphani/6200161 to your computer and use it in GitHub Desktop.
Save shriphani/6200161 to your computer and use it in GitHub Desktop.
#include <cstdio>
#include <cstdlib>
using namespace std;
int main(int argc, char ** argv) {
int u1;
int u2;
int tid;
char s[20000];
FILE* graph_file_pointer = fopen("username_mention_graph.txt", "r");
while (!feof(graph_file_pointer)) {
int err = fscanf(graph_file_pointer, "%d\t%d\t%d\t%[^\n]s", &u1, &u2, &tid, s);
printf("%d\t%d\t%d\t%s\n", u1, u2, tid, s);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment