0
Hello everyone🙋🏻♂️, My code has error in switch case statment. Could anyone please help me to debug this.
I have write a program that generates the date of next day. I have defined the date of 5days in the variable and want to get the date of next day. I have used two different functions,one for printing the date and another for generating the date of next day. The program is showing an error massage which says that DUPLICATE CASE VALUE. But according to me their is not any duplication of value in switch case statement. Please anyone helps to debug this. Just see my code once please. https://code.sololearn.com/cbmpvNyIOumk/?ref=app
3 Antworten
+ 4
It's because enum <months> has more than 1 constant defined with same value (number of days).
+ 2
No problem at all Rohit 👌
+ 1
Ipang oh I forgot that thing.
Thank you so much for your answer.
Let's I change the logic for my code.
Once again thank you so much sir.