All,
I am having difficulty converting the results of a query to a character.
Here is A snippit of code.
...
//Connect to server
Connection con("Table", "localhost", "USER", "");
// Create query object
Query query = con.query();
query << input; // This is working as I can print out the
// query.
delete(input);
Result res = query.store();
Row row;
cout.setf(ios::left);
Result::iterator i;
while(opt == 0)
{
for(i = res.begin(); i != res.end(); i++)
{
row = *i;
for(unsigned int j=0;j<row.size(); j++)
{
cout << j+1 << ".\t" << row[j];
)
cout << endl;
}
/* Select which to use */
cout << "#";
cin >> opt;
if(opt > 0)
{
sel = new char[sizeof(row[opt])];
bzero((char *) &sel, sizeof(sel));
i = res.begin();
for(int goon = 1; goon <= opt; goon++)
{
row = *i++;
}
sel[boon] = row[j];
}
...
The error I am getting is:
In file included from dnd.cpp:25:
monster.h: In function 'void mon_list ()':
monster.h:498: cannot convert 'const MysqlColData' to 'char' in
assignment.
Any suggestions are welcomed.
Thank you,
Rick
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php