View Single Post
  #27 (permalink)  
Old April 1st, 2004, 02:44 PM
davekw7x davekw7x is offline
Authorized User
 
Join Date: Feb 2004
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What if this function is called with, say 'Z' as an argument? You must
take all possible cases into account. So, for example, after your
last if statement, you could put
Code:
else {
  cout << "Error in atohex(), illegal argument <" << c << ">" << endl;
  return -1; // or return anything that the calling routine can test
}
Dave
Reply With Quote