On Sat, Feb 19, 2005 at 02:42:08PM -0500, Chris Gagnon wrote:
Quote:
Hi i can get the program to connect to the database but as soon as i
attempt to retrieve a result set it Seg Faults and i can't figure out
why. As you can see i've added extra catch( ...)'s to ensure i'm not
missing any exceptions. |
Please post a backtrace of the segfault.
Quote:
Here is the code:
//declaired private in the class containing this code block
Connection *dbCon;
//initialize database
try
{
dbCon = new Connection(use_exceptions); |
This is unrelated, but you don't have to allocate this on the heap.
Allocating on the heap without at least using auto_ptr<> means there
can be memory leaks when exceptions happen.
- Chris
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw