I just tried to compile my program and the only error I got was that it said line 98: function definition does not declare parameters. I am using g++ to compile
it is occuring with the string in the CheckingAccount::input()
I can enter without spaces but when I uses spaces for the name it sends it into an infinite loop
The problem likely resides in the fact that cin>> will terminate when it hits a whitespace character or newline. Since you entered several spaces, cin>> hits the first one, exits and goes to the next cin>>, which immediately (before you can type any response) reads the space and exits as well. This probably repeats several times. I can't really see why it would loop forever at your while, however. Is "choice" getting assigned a space character or is it staying as uninitialized garbage?
You should probably use getline(cin, my_string_name);.
That will read until an enter, and won't leave any extra newlines in the buffer either. The only thing is when you read that char with cin>>, it will leave a newline in the buffer that you'll have to toss or ignore.