
26 Mar
2010
26 Mar
'10
9:23 p.m.
On Mar 26, 2010, at 11:36 AM, Trevor Harmon wrote:
Yes, I had tried that, and the pointers are added to the graph okay using add_vertex, but when I try to pull them out using, say, graph[0], my program segfaults. I have no idea what I'm doing wrong.
Never mind the above; I was doing something dumb. One of the graphs I had created was empty, and so graph[0] was being called on an empty graph. Still, I'm not sure why that would actually cause a segfault. In fact, it wasn't the call that was causing the segfault but rather the assignment: graph[0]; // okay void foo* = graph[0]; // bus error Anyway, at least it's working now... Trevor