14 //numNodes
0 ( 3): 5 9 10 //node (outdegree) and nodes adjacent to
1 (10): 0 5 8 10 9 7 6 11 12 13 //no particular order
Having a problem reading this input, I know it's a terribly inefficient way to do it but it works. My problem is that line 37 is causing a segmentation fault and I don't know why.The outdegree and node number are being read correctly but when i try to get adjnodes it causes a seg fault. I think I'm declaring the array incorrectly but can anyone help? Thanks
That is because on line 8, adjNode is a pointer. So for you to use it, you have to initialise it. The way to do this is to use the new keyword/constructor/allocator.