Exception handling?

Discussion in 'C++' started by JoeC, Apr 6, 2010.

  1. JoeC

    JoeC Guest

    How do I write a try throw command to see if this array is good?

    This is what I have so far:

    void bitmap::changeBit(int ac, int dn, BYTE col){
    BYTE up = 16-dn;
    BYTE num = (up*acc)+ac;

    if((num < acc*dwn) || (num > 0)){
    if(bits == NULL){MessageBox(NULL, "HELP", "Info", MB_OK);}else{
    try{bits[num] = col;}
    catch(Exception e){MessageBox(NULL, e.message(), "Info", MB_OK);}

    }
    }
    }
    JoeC, Apr 6, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Babu
    Replies:
    1
    Views:
    2,908
    Jim Gibson
    Mar 10, 2005
  2. Mark Tarver
    Replies:
    22
    Views:
    1,280
    J Kenneth King
    Apr 26, 2009
  3. Peter
    Replies:
    34
    Views:
    1,919
    James Kanze
    Oct 17, 2009
  4. VSK
    Replies:
    0
    Views:
    238
  5. Iñaki Baz Castillo
    Replies:
    1
    Views:
    176
    Iñaki Baz Castillo
    Apr 15, 2008
Loading...

Share This Page