I've just recompiled some code and suddenly I'm getting this strange error:
DBI::query() is being called inside a private class method (not from inside the DBI class); it is non-static and non-const, and neither is the function calling it. The first parameter is defined the line before the call to DBI::query(). Also, DBI::query() is being called through a non-static member of the calling class. The code below (I think) shows the general jist.Code:'bool DBI::query(std::vector<_Ty> &,std::string &)' : cannot convert parameter 1 from 'std::vector<_Ty>' to 'std::vector<_Ty> &'
I'm possibly being too vague (tell me if I am), but does this problem sound familiar to anyone?
I'm using the free MSVC++ fyi.
Code:class DBI { ... }; class Caller { DBI& mDBH; public: Caller( DBI& dbh ) : mDBH( dbh ) {} void call() { std::vector<std::string> data; if( mDBH.query( data, "asdosah" ) ) throw 1; } // ... };



LinkBack URL
About LinkBacks



CornedBee