my program does what its spose to do in terms of finding things but once it finds something thats not in the first record it will stack smash and terminate when i want to have it continously running until ctrl c
Stack-smashing refers to a specific kind of exploit where an unchecked buffer overflow is taken advantage of to force the program to execute outside code. The actual programming error is called buffer overflow.
The only way to prevent this kind of errors in C/++ is with good coding techniques.