Skip to main content

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 12:42
Carl Ogden is currently offline Carl OgdenFriend
Messages: 1
Registered: June 2013
Junior Member

First of all, thanks for any help given!

I've started to write a c++ program on Ubuntu to hopefully replace a 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());

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,

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: Wed Oct 17 02:54:48 GMT 2018

Powered by FUDForum. Page generated in 0.01309 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top