+ 3
++ is called an increment operator. when we write a++ we really say 'a plus one' taking a variable (like a) and adding one to it is needed very often in programming, so the a++ is a convenient way to do so, without it, you'd be writing a = a+1 or a+=1 every time. there's also a--, which decrements a (a minus one) For examples, say you have a database of customers, with customer id, first name and last name id first name last name 1 Jerry McJones 2 Obsidian McNight 3 Vince Noir 4 Howard Moon ... and you want your code to go through that database, do something with each entry and then pass on to the next, you'd start with id no1, do some processing and then, id++, to move to the next entry and execute the same code there, thus looping through the entire database. Btw C++ is called C++ because it grew out of another language, C. Regards Andres
25th Sep 2016, 4:07 PM
Andres Mar