I am trying to create an ADT String and when I compile my program it gets a Segmentation Fault while it tests my add function. Here is what I have. I am not sure why or where it is getting the segmentation fault.
Oh yeah I guess you're right about lines 7-10. Beginners mistake.. So if I am going 1 position out of the array would I have it as result.s[i+offset-1]?
Okay well I fixed my function but when I compile it with my makefile it still says theres a segmentation fault.. could it be something other than my operator+ function? I know this thread isn't about unix but here's the error message I get..
I have a .cpp file for every function I want to test and use assert to test them. So this should correctly check if the operator+ is working correctly but when I compile I get the segmentation fault.