0

I got a problem with j+4;.How it is possible?

c++

24th Dec 2016, 5:27 PM
Emanuel Lozitsky
Emanuel Lozitsky - avatar
4 Antworten
+ 4
Impossible to say, with so little information ^^
24th Dec 2016, 5:31 PM
visph
visph - avatar
+ 2
If it is, it's just the line repported by the compilator, because a missing semi-colon in previous end line? Or even a lot of another things :P
24th Dec 2016, 5:40 PM
visph
visph - avatar
0
well you have not given enough information about the variable or object "j" is. so assuming j is a variable of type int then you should not have any problem. but if it is of the type Boolean then that may be your problem. If this is used in a method then may be there would a type miss-match. if "j" is a string then you cannot add it to a integer.
24th Dec 2016, 5:36 PM
TheNaman047
TheNaman047 - avatar
0
I corrected it with j=j+4 and immediately it worked.
25th Dec 2016, 10:02 PM
Emanuel Lozitsky
Emanuel Lozitsky - avatar