0
How come in the error list it says: 'numberOfPeople': unreferenced local variable 'topChoiceTotal': unreferenced local variable Unintialized local variable 'rating' used How can I fix it? :(
char rating; string favoriteSnack ; int numberOfPeople; int topChoiceTotal; favoriteSnack = "crackers"; rating = 'B'; numberOfPeople = '250'; topChoiceTotal = '148';
1 Resposta
+ 1
As numberOfPeople and topChoiceTotal are int variables, you should assign the value without single quotes... Just like this numberOfPeople=250;