Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Issue with c++ and/or variables(re-compiling a program written under Ubuntu using Mint)
Issue with c++ and/or variables [message #1064253] Tue, 18 June 2013 08:42
Carl Ogden is currently offline Carl Ogden
Messages: 1
Registered: June 2013
Junior Member
Hi,

First of all, thanks for any help given!

I've started to write a c++ program on Ubuntu to hopefully replace a vb.net program. It reads a MySQL database table and displays the results on qtablewidget.

I've copied the folders from my Ubuntu system to Mint 14 and then opened it in Eclipse. Started the compile and the errors are numerous but I'm confused with the following:-

std::string strTemp;

QSqlQuery LoadOrders;
QString querystring(strSQL.c_str());
LoadOrders.prepare(querystring);
LoadOrders.exec();

Then, I want to put the results on my table:-

strTemp = LoadOrders.value("OrderCode").toString();

BUT, I'm getting

/home/backoffice/Source/MSC Front Desk/MSCFrontDesk/mainwindow.cpp:109: error: invalid conversion from 'const char*' to 'int' [-fpermissive]

/home/backoffice/Source/MSC Front Desk/MSCFrontDesk/mainwindow.cpp:109: error: no match for 'operator=' in 'strTemp = QVariant::toString() const()'

Now, I think this might have something to do with it but again, not sure!

/usr/include/qt4/QtSql/qsqlquery.h:89: error: initializing argument 1 of 'QVariant QSqlQuery::value(int) const' [-fpermissive]

Do you think there are fundamental differences with the qsqlquery libraries between Ubuntu and Mint?

Cheers for any pointers or help,
Carl.




Previous Topic:Launching the correct executable (Release vs Debug)
Next Topic:Open declaration doesn't work for J2ee program in eclipse juno
Goto Forum:
  


Current Time: Sat Aug 23 03:47:42 EDT 2014

Powered by FUDForum. Page generated in 0.01441 seconds