fork(5) download
  1. #include <igraph.h>
  2.  
  3. int main(void)
  4. {
  5. igraph_integer_t diameter;
  6. igraph_t graph;
  7. igraph_rng_seed(igraph_rng_default(), 42);
  8. igraph_erdos_renyi_game(&graph, IGRAPH_ERDOS_RENYI_GNP, 1000, 5.0/1000,
  9. IGRAPH_UNDIRECTED, IGRAPH_NO_LOOPS);
  10. igraph_diameter(&graph, &diameter, 0, 0, 0, IGRAPH_UNDIRECTED, 1);
  11. printf("Diameter of a random graph with average degree 5: %d\n",
  12. (int) diameter);
  13. igraph_destroy(&graph);
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:20: fatal error: igraph.h: No such file or directory
compilation terminated.
stdout
Standard output is empty