Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: failing row[] assignment

From: Jeff Huston <hustonfamily(at)hotmail.com>
Date: Fri Aug 03 2007 - 13:42:52 EDT


"A static cast like that should never be required for an assignment in a C++ program."

Wouldn't it be just as easy to say, "Hey Jeff, you'd be better advised to use get_string().". Disgegarding the comment in coldata.h which says.. 'If you know your data is a null-terminated C string, just cast this object to const char *...' " :o) Of course I realize this is all the result of a multi person, collaborative effort.

Hey, as it turns out... my unix admin, ignored my requests and installed 2.2.3 instead of 2.3.2 (guess this whole universal practice of symbollic linking to the correct .so sorts of undermines the versioning of filenames, huh)... so my 2.3.2 code was hitting the 2.2.3 library. Once the correct .so was put out there... surprise, surprise... everything works.

Anyway, I'm sure the Don Rickle's style responses here no doubt have their own appeal to the rest of the audience who actually know what they're doing.   As for me... I'll quietly sink back into the shadows now. :o)

>From: Warren Young <mysqlpp@etr-usa.com>
>Reply-To: plusplus@lists.mysql.com
>To: MySQL++ Mailing List <plusplus@lists.mysql.com>
>Subject: Re: failing row[] assignment
>Date: Wed, 01 Aug 2007 18:02:04 -0600
>
>Jeff Huston wrote:
>>In which case the cast is required is it not?...
>
>A static cast like that should never be required for an assignment in a C++
>program. C++ has strong type checking, but static casts completely disable
>this feature. If the compiler refuses to allow the assignment without a
>cast, you need to work within the type system to fix it, not bypass it.
>
>(That's the general rule...there are exceptions, of course.)
>
>--
>MySQL++ Mailing List
>For list archives: http://lists.mysql.com/plusplus
>To unsubscribe:
>http://lists.mysql.com/plusplus?unsub=hustonfamily@hotmail.com
>



Booking a flight? Know when to buy with airfare predictions on MSN Travel. http://travel.msn.com/Articles/aboutfarecast.aspx&ocid=T001MSN25A07001
-- 
MySQL++ Mailing List
For list archives: 
http://lists.mysql.com/plusplus
To unsubscribe:    
http://lists.mysql.com/plusplus?unsub=lists@pantek.com
Received on Fri Aug 3 13:43:20 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:28:36 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library