void playAgain()
{
	char again;
	
	cout << "Do you want to play again (y/n)?: ";
	cin >> again;
	
	if (again == 'y')
		chooseOption();
	else if (again == 'n')
		cout << endl << "Thanks for playing Connect Four, the game of the clever people!";
	else
		cout << "Invalid Choice" << endl;
		playAgain();

	return;
}

when n is entered, it loops itself back to the begining again.
i need it to terminate when n is entered, but cant work out how to do it.

Recommended Answers

All 2 Replies

the last else (lines 13,14)should be in a block ({})

cheers that did it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.