Function call resulting in a strange looping
Hey, all:
I've attached a file here. Basically, it's a program that allows me to test string lengths, copy strings, and compare them(letter-for-letter).
If the 2 comparision string are identical, the program should return a 0, otherwise it should return a 1.
In any case, the situation is that when I enter "R" from my menu, I am taken to my "readString" function where I am prompted to enter a string. This is okay. The problem, however, is that my program doesn't seem capable of escaping the "read" function.
It does something really weird. It keeps asking me for source string based on the number of characters in the first string I enter.
e.g. I enter "the" ( asks me to enter source string 3 more times)
e.g. I enter "them" (asks for a source string 4 more times)
Can someone please check out my attached code and provide me with some feedback?
Thanks!!
some of it works..not all
Thanks a bunch for your help. You're very smart.
My readData now seems to work, but every time I call another of my functions from my menu, my program just exits. Is there something I'm doing wrong in my method calls??
Thanks.