Endless shampoo loop

This is a discussion on Endless shampoo loop within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Excuse my ignorance, but i'm not really familiar with the term. adios, biterman....

  1. #31
    free(me);
    Join Date
    Oct 2001
    Location
    Santo Domingo, DN, Dominican Republic
    Posts
    98

    A macro?

    Excuse my ignorance, but i'm not really familiar with the term.

    adios,
    biterman.
    Do you know how contemptous they are of you?

  2. #32
    Former Member
    Join Date
    Oct 2001
    Posts
    955
    well, letme say it with an example:

    a Win32 Function:
    CreateWindowEx()

    a Win32 Macro
    MAKEINTRESOURCE

    get it?

    Oskilian

  3. #33
    free(me);
    Join Date
    Oct 2001
    Location
    Santo Domingo, DN, Dominican Republic
    Posts
    98

    Not really...

    No.

    adios,
    biterman.
    Do you know how contemptous they are of you?

  4. #34
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    > actually, it would stop after you've done one bottle...

    Well, that would be a runtime (I mean...showertime) error. When you run out of ram, you get the runtime error. When you run out of shampoo, you get a showertime error. The results of the error will be excessive crying.

    --Garfield the Magnificent
    1978 Silver Anniversary Corvette

  5. #35
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    or just REALLY nasty hair.

  6. #36
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    > or just REALLY nasty hair.

    Well, I didn't want to mention that but...thanks.

    --Garfield the Programmer
    1978 Silver Anniversary Corvette

  7. #37
    A Banana Yoshi's Avatar
    Join Date
    Oct 2001
    Posts
    857
    Nasty Nasty Nasty
    Yoshi

  8. #38
    Former Member
    Join Date
    Oct 2001
    Posts
    955
    I bought another bottle and it says (recursive version in C++)

    Code:
    int shampoo::apply(int where, int amountofshampooleftinbottle)
    {
        int amountused;
        if(amountofshampooleftinbottle>0)
        {
            this->move(where);
            amountused=this->squeeze();
            RinseHair(withwater);
            this->apply(where,amountofshampooleftinbottle-amountused);
        }
        else
        {
            MessageBox("No more shampoo, buy another bottle!","Error",MB_OK);
            CloseShower();
        }
        
    }
    and I get stack overflows!!, well, shampoo overflows!

    Oskilian
    Last edited by oskilian; 11-07-2001 at 08:58 PM.

  9. #39
    A Banana Yoshi's Avatar
    Join Date
    Oct 2001
    Posts
    857
    LOL
    Yoshi

  10. #40
    Back! ^.^ *Michelle*'s Avatar
    Join Date
    Oct 2001
    Posts
    568
    teeheehee
    Michelle (o^.^o)
    *Unique*
    Kaomoji House

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fscanf endless loop
    By krum in forum C Programming
    Replies: 3
    Last Post: 12-04-2007, 11:14 PM
  2. return to start coding?
    By talnoy in forum C++ Programming
    Replies: 1
    Last Post: 01-26-2006, 02:48 AM
  3. loop needed also how to make input use letters
    By LoRdHSV1991 in forum C Programming
    Replies: 3
    Last Post: 01-13-2006, 04:39 AM
  4. when a while loop will stop ?
    By blue_gene in forum C Programming
    Replies: 13
    Last Post: 04-20-2004, 03:45 PM
  5. How to change recursive loop to non recursive loop
    By ooosawaddee3 in forum C Programming
    Replies: 1
    Last Post: 06-24-2002, 08:15 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21