My suggestion would be to return a strinng variable like temp and make sure you check for that variable i main if you need to. it keeps on loop because it needs to gewt the values you entered in this case 0, 1,2. It will keep going until you type those values. if you want it to stop return a string variable after the cout << "\n\nThat's not a valid selection! Please try again.\n";, and it should work.
Your loop will keep loopin as long as the following is TRUE (currentSize != "q" || currentSize != "Q");
This is an OR statement, so if either side is TRUE, then the whole thing comes out as TRUE. So for the loop to stop, we need both sides to come out as FALSE.
Let's take a look at the left side. currentSize != "q" This will be FALSE only in one case, right? When currentSize is "q".
Let's take a look at the right side. currentSize != "Q" This will be FALSE only in one case, right? When currentSize is "Q".
So for both sides to be FALSE, you need currentSize to be q, and also Q, at the same time. Is that possible? No.
Basically, you've written a condition that is true forever.