The title doesnt really make sense but basically when I run my program, and I try to cin playerOne and playerTwo, it doesnt let me assign a string to playerOne,
if I use "cin" instead of getline, it works, but I wont be able to write a last name...
(Please enter A when you run)
One more problem, if I enter anything besides 'A' or 'B' it does the corect error message, but if I say 'ittsbfa' or anything more than 1 character, the error message will repeat itselft that many times.
is this because it is a char and not a string?
can I even make a string of 1 character?
thats not the error, and in the future it will return an int, the issue is for the main function, when it asks to enter A or B, and anything else will be an error message. for example it i enter C it will give me an error message, if I enter CCC it will give me 3 error messages in a row. Should I change choice to a string variable?
You made the contractual promise your functions would return a value, add code to do so even if it is not used at this time. Deliberately writing code wrong is, well, wrong.
Putting your "it's possible to enter wrong data" input logic into a loop so if the user enters bogus data the program loops back to getting the input again and again until the expected data is entered.
The type of loop (for, while, do/while) is up to you, and how you structure your input logic.
I recommend you add a generic return statement to the end of each function for testing purposes. Say return -1;. That way you don't have to change the function declarations/definitions later, just modify the return statements when you actually write the code for computing what you want to return.
A lot less work that way, and easier to change one statement instead of multiple ones.