Link to post

Share on other sites

This segment of code above creates an infinite loop. Get rid of the goto loop statement and have it goto start instead. You want to check the input for quit condition so it's not infinitely loop your program. For example, if the user enter just q it terminates. I recommend getting away from gotos unless they're absolutely necessary ie. demanded by someone you're doing coding for (though I can't image anyone outside programming class making such a demand). Also you don't need to include cstring since you're not using anything from cstring. It would probably be better if you were using a string instead of a char, unless you're attempt to understand how to deal with char pointers.