0

What am I doing wrong to get unexpected unqualified error?

I'm getting a unexpected unqualified id before 'int' line 18 https://code.sololearn.com/cIsUeGW64oZL/?ref=app

25th Aug 2022, 5:53 AM
Malachite
Malachite - avatar
4 Answers
+ 1
Malachite int a = 0, int b = 0; is a wrong syntax It should be int a = 0, b = 0; or it should be int a = 0; int b = 0;
25th Aug 2022, 6:10 AM
A͢J
A͢J - avatar
+ 1
Ah thank you
25th Aug 2022, 6:12 AM
Malachite
Malachite - avatar
0
Malachite Also (char str) is not an array, it is a single character so str[i] is wrong there should be str1[i]
25th Aug 2022, 6:13 AM
A͢J
A͢J - avatar
0
Yeah I'm running into that problem right now
25th Aug 2022, 6:14 AM
Malachite
Malachite - avatar