+ 1

What are these error..?

A label can only be a part of a statement and declaration is not a statement Expected expression before.., all im getting are these errors https://code.sololearn.com/cwegZa2Z9HKq/?ref=app

16th Mar 2020, 12:56 PM
Y AD Ù
Y AD Ù - avatar
1 Resposta
+ 2
You can put semicolon (empty statement) at the end of case statement (right after colon), like this: case 1: ; int num; ..... ..... case 2: ; ... Or, better, move all variable declaration outside of the switch. Put it before switch statement int num; int r; int n; char word[8]; switch(j) { ..... Declare variable before switch statement
16th Mar 2020, 1:14 PM
andriy kan
andriy kan - avatar