当前位置: 技术问答>linux和unix
请问以下代码为什么会出错?
来源: 互联网 发布时间:2015-05-24
本文导语: #include #include #include int main() { // The full format for the Connection constructor is // Connection(cchar *db, cchar *host="", // cchar *user="", cchar *passwd="") // You may need to specify some of them if...
#include
#include
#include
int main() {
// The full format for the Connection constructor is
// Connection(cchar *db, cchar *host="",
// cchar *user="", cchar *passwd="")
// You may need to specify some of them if the database is not on
// the local machine or you database username is not the same as your
// login name, etc..
try {
Connection con("mysql_cpp_data");
Query query = con.query();
// This creates a query object that is bound to con.
query
#include
#include
int main() {
// The full format for the Connection constructor is
// Connection(cchar *db, cchar *host="",
// cchar *user="", cchar *passwd="")
// You may need to specify some of them if the database is not on
// the local machine or you database username is not the same as your
// login name, etc..
try {
Connection con("mysql_cpp_data");
Query query = con.query();
// This creates a query object that is bound to con.
query