Does mysql++ 2.1.1 work on your comp.?

A

andref

Hello!

I use Visual C++ 2005 Express Edition and mysql++2.1.1.

Everythink works fine when I'm useing object mysqlpp::Connection(...)
only.
mysqlpp::Connection baza("information_schema",
"localhost","root","pass",0);

It even realy connects to MySQL.

But when I create mysqlpp::Query objeckt like that:
mysqlpp::Query and=baza.query();

The progrogram compiles, links, but when I run the program it crushes
when object is deleteing from memory - destructor works. i.e:
// -1
{
mysqlpp::Query and=baza.query();
.
.
/*here: destructor is colled automatically. - and somewhere here my
program crushes.*/
}

The only way to omit destruction is:
// -2
{
//dinamic allocation:
mysqlpp::Query *and = new mysqlpp::Query(baza.query());
.
.
/*here is NO destructor colled. so it works ok and goes ahead.
When I uncoment the following line, program will crush again:
delete and;*/
}

The problem seems to be with destruction of the object.
I know that not useing delete will cause a memory leak. :(

Here is the compilation report:
http://student.agh.edu.pl/~andref/Compilation/Compilation.txt
(as you see everything goes proper - however there were warnings)

Please, help. I cannot handle this problem.
Does anyone of U have the same problem, or only I do something wrong?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top