![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Yingbo Miao wrote: I wonder whether it is a good way to return the "raw string" directly from the class ROW. For example, one line line can be added to the row.h =20 How about the following, already present i row.h? =20 // Return the value of a field given its index, in raw form. const char* raw_data(int i) const { return data_[i].data(); } =20 What are you missing in this? =20 / p=E5l =20 =20 =20 -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsu...gmail (DOT) c= om =20 |
#3
| |||
| |||
|
|
Oh, sorry. I copied wrong code from row.h. It should be: =20 const std::string & raw_string ( int i ) const { return data.at(i); } =20 =20 On 8/4/05, P=E5l Brattberg <pal (AT) eminds (DOT) se> wrote: Yingbo Miao wrote: I wonder whether it is a good way to return the "raw string" directl= y from the class ROW. For example, one line line can be added to the row.= h How about the following, already present i row.h? // Return the value of a field given its index, in raw form. const char* raw_data(int i) const { return data_[i].data(); } What are you missing in this? / p=E5l |
#4
| |||
| |||
|
|
I wonder whether it is a good way to return the "raw string" directly from the class ROW. For example, one line line can be added to the row.h class ROW ... { public: // The suggestion function. Return the "raw string" const std::string & raw_string ( int i ) const { return data.at(i); } |
![]() |
| Thread Tools | |
| Display Modes | |
| |