Warren Young wrote:
> Brad Hubbard wrote:
>> mysqlpp::Null<mysqlpp::sql_char>, mobileNumber,
>> mysqlpp::String &mob = it->mobileNumber;
> You mean either:
> mysqlpp::Null<mysqlpp::String> &mob = it->mobileNumber;
> mysqlpp::String &mob = it->mobileNumber.data;
But I thought this;
return data = Behavior::null_is();
in null.h must be how you "safely" get the data member. You'll notice in
my original post I have a line where I access data directly and I
realise it is public but I thought there must be some type of "accessor"
> Actually, you don't have to use references if you don't want to.
> mysqlpp::String has reference-counted copies, so they're cheap.
> Also, I would use mysqlpp::sql_char here instead of String, just to
> avoid confusion.
So would you mind showing me the recommended way to access the
underlying string "safely" please?
Thanks for your input,