Thread: Some clarification please.

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    33

    Some clarification please.

    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.

  2. #2

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    and I did ask my friend he doesn't know, I'm just hoping he didnt plagiarize.
    Well if he didn't know, how would he have gotten it into his program without plagiarizing?

  4. #4
    Registered User
    Join Date
    Oct 2011
    Posts
    33
    touché lol

    and stahta01 thanks for the link, I was able to understand all that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Clarification....
    By CommonTater in forum C Programming
    Replies: 4
    Last Post: 09-23-2010, 05:39 PM
  2. clarification
    By WDT in forum C# Programming
    Replies: 1
    Last Post: 01-21-2009, 01:09 AM
  3. Help! Need some clarification.
    By jaro in forum C Programming
    Replies: 2
    Last Post: 04-08-2006, 11:44 AM
  4. Need a clarification here
    By bithub in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 12-27-2004, 01:06 AM
  5. need clarification on something...
    By EvBladeRunnervE in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 03-08-2004, 09:45 AM