I was looking over my friend's code to see what i was doing wrong and he had a line that said this
Code:
get_room_amount(&rooms)
for (cur_rooms=0; cur_room < rooms; cur_rooms++){
now this is suppose to calculate the number of rooms in a house (to be painted afterwards). So I'm pretty sure im looking at a function.
I just dont get what the bolded part means. I've used it before but never really understood it.
What i think it means is
cur_rooms is initialized to 0 (zero)
cur_room < rooms (i dont know why it would be like that)
cur_rooms++ (i dont even know what ++ does...does it add 1 or 2 to the 0?)
I'm trying hard to pretty much teach myself, Since i cannot understand my professor.
and I did ask my friend he doesn't know, I'm just hoping he didnt plagiarize.
Appreciate the help.