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.
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.