Exception handling?

J

JoeC

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);}

}
}
}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top