then I guess its skipping the getline line completely at first,
Nope, the computer will do exactly as you tell.
What is happenning is that you've got an '\n' that remains in the buffer, so when getline reads, it reads till the end of line (it reads nothing in this case).
Try in.ignore(); or in.ignore( numeric_limits<streamsize>::max(), '\n' );
Don't srand() anywhere but somewhere at the top of main().
Lines 28 and 36 do the same things. Change 36 to } while (true);. (You don't technically need line 32 either.)
Line 75 tests something that you already know as a consequence of line 44. All you need is an else.
The problem you are having is that somewhere else in your program you are not clearing the newline from the user's input before you call this function again.
Remember: the user will always press ENTER at the end of every input.
You aren't paying attention. The problem isn't in your function. It is that somewhere else in your program you are leaving a newline in the input after getting something from the user. Find that and fix it.
I tried using the cin.ignore( numeric_limits <streamsize> ::max(), '\n' ) line before every input, and it solved the line being displayed where I didnt want it, but now I have to type in the command 2 times everytime I want to do something
Ehh, dont worry about it, I guess I probably should have paid more attention to the whole residual newline thing :P I just didnt really understand it though xD