Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

defining a global connection (no replies)

$
0
0
I am trying to modify the connect.cpp code. I am wondering how to define the connection parameter con as a global variable. I understand defining global variables is a bad practice in many cases, but I think I am stuck in this instance.

I have some extra functions that won't allow the connection information to be passed to it. So the only other way I can think of to allow these functions access to the connection information is to define a global connection.

Any help would be great, thanks.

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>