In Variables Topic, First It Tells Me I Can Assign int XYZ Multiple Values. Next it says Doing So Results In Syntax Error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

In Variables Topic, First It Tells Me I Can Assign int XYZ Multiple Values. Next it says Doing So Results In Syntax Error

Any Help ?

27th Jan 2017, 4:44 PM
#00B3B3
#00B3B3 - avatar
2 Answers
+ 8
You can do this: int x=3; x=5; but you can't do this: const int i=5; ++i;
27th Jan 2017, 11:12 PM
Filip
Filip - avatar
+ 3
Ah Thanks For The Reply Guys. @Filip, ++i Is Just An Example Right ? Like ++x Or Something ... @Kenyatta Madison, Why Does "Double y" Produce An Error ? Doesn't It Become Another Variable When Gap Or Space Is Inserted ?
28th Jan 2017, 1:48 PM
#00B3B3
#00B3B3 - avatar