The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Article Feedback - Web Resources
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Re: THAT worked !
Author: Jason 
Date:   28-07-04 21:55

For some reason I had to append (ostream&) to the front of the query assignment.

I was getting the following error

create_table.cpp:28: error: ISO C++ says that `std::basic_ostream<char,
_Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)
[with _Traits = std::char_traits<char>]' and `SQLQuery&
operator<<(SQLQuery&, const mysql_ColData<std::string>&)' are ambiguous even
though the worst conversion for the former is better than the worst
conversion for the latter

Looking over some code from mysql.com simple1.cc showed the query string formed like this:

(ostream&)query << "select * from stock";

I applied that to create_table.cpp and it compiled without a hitch.

Freebsd 5.2.1 / gcc 3.3.3

If anyone else has this problem hope it helps.

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 THAT worked !   new
nas 19-08-02 11:20 
 Re: THAT worked !   new
Dan Langille 19-08-02 15:33 
 Re: THAT worked !   new
Jason 28-07-04 21:55 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org