Unable to find the cause of segmentation error in this code

Line 71 is illegal, since you haven't allocated any memory for the pointer yet, and are thus trying to deference a garbage pointer. I think you meant to do this:

activecust = &bcust[i];

This causes the pointer to point at the specific instance.
Huh? It would appear OP has deleted his post, but the thread has (somehow) remained.
Last edited on
Yeah, this seems to happen sometimes >_>
Topic archived. No new replies allowed.