wierdest (annoying) C++ bug

This is a discussion on wierdest (annoying) C++ bug within the C++ Programming forums, part of the General Programming Boards category; I was recently in a tour of a professional games company and asked the question 'what was your most irritating ...

  1. #1
    Frustrated Programmer :( phantom's Avatar
    Join Date
    Sep 2001
    Posts
    163

    wierdest (annoying) C++ bug

    I was recently in a tour of a professional games company and asked the question 'what was your most irritating beta bug?', he mis-interprated the question and answered 'any that gets released into the final version'.

    My most irritating bug was having a loop->
    for(i=0; i<10; i++)
    {
    //do what I had to do
    if (this happens) {i=0;} //reset 'i' in order to start the loop again
    }
    What I didn't realise was that when I reset 'i' to 0 the loop was incremented after that statement and actually started on 1
    My site to register for all my other websites!
    'Clifton Bazaar'

  2. #2
    Intranasal Heroin User Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,035
    you call that annoying? you should see the bugs I deal with

  3. #3
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    its often the smallest bugs that cause the biggest problems.....

    this is one of my favourites...

    if(y=2 || x=4) {...}

    heres another....

    while(1);{....}
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  4. #4
    Frustrated Programmer :( phantom's Avatar
    Join Date
    Sep 2001
    Posts
    163

    you call that annoying? you should see the bugs I deal with

    I would love to hear them, that way the rest of us don't do the same mistakes

    And I must admit I have done the if(y=2); mistake
    My site to register for all my other websites!
    'Clifton Bazaar'

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gaks bug?
    By Yarin in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-31-2008, 02:47 PM
  2. ATL bug of CComPtr?
    By George2 in forum Windows Programming
    Replies: 6
    Last Post: 04-07-2008, 07:52 AM
  3. Annoying bug I can't find or fix!
    By homeyg in forum C++ Programming
    Replies: 3
    Last Post: 11-20-2004, 11:13 PM
  4. annoying lil bug
    By baka1337 in forum C++ Programming
    Replies: 6
    Last Post: 04-23-2003, 12:36 AM
  5. Annoying MSVC6 Std bug
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-03-2002, 02:04 PM

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