While debugging I keep getting a segmentation fault when I come to this portion of my .cpp file. Is there anyway someone can help me fix this error because it's frustrating and I don't know where it's coming from.
Almost certainly, you're trying to read or write memory that doesn't belong to you, because you've got a bad pointer. Without a working debugger to tell you exactly where, you'll just have to output the value of each pointer you're using and see which of them is bad.