Re: [Dev-C++] Problem with example from Savitch book
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Hossein H. <ult...@em...> - 2003-10-19 21:03:36
|
Hi Joe, > min = a[index] < min; I think PerW mentionned the right bug here, and his correction is also plausible. This compiles and runs, as bool values are automatically converted to numerals. If your contained type was something not having got a constructor getting bools (or anything bool is convertible to), then the code wouldn't compile. Furthermore, the book you mentioned is "Not Recommended." Just take a look to the following critique from ACCU, which is the best (at lease C++) critique: http://www.accu.org/cgi-bin/accu/rvout.cgi?from=0ti_p&file=p001790a (Don't click on it, just copy/pates it in the addresbar.) And as the final point, from Generic Programming standpoint, your code is poorly implemented. I recommend the following Bible to improve your Generic Programming skills: http://www.awprofessional.com/catalog/product.asp?session_id={5853690A-CEE4-4981-B350-524C8A28B7EA}&product_id={94C46B18-97C4-4143-BA92-E4156187A6D8} Regards, --Hossein -- __________________________________________________________ Sign-up for your own personalized E-mail at Mail.com http://www.mail.com/?sr=signup CareerBuilder.com has over 400,000 jobs. Be smarter about your job search http://corp.mail.com/careers |