-8
のためにはい/いいえ機能のために助けが必要。私は(<strong>文字N</strong>)は、ユーザからの「<strong>Y</strong>」または「<strong>N</strong>」のいずれかを受け取るだろう私のプログラム
bool YesNo(char n) //Prototype Function
{
if (n == "Y")
return 1; // true
else
return 0; //false
}
'' Y ''は' char'ではなく、 'const char [2]'です。 [良い本](https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list)を読むことをお勧めします。 – Rakete1111
"// Prototype Function" - プロトタイプではなく、定義です。そして、あなたは '' Y''ではなく '' Y''を望みます。 –
'return n == 'Y';' – George