Okay, in a program that I am creating I have run into a problem.
I have this one class ( of which there only needs to be on instance of ) that will be accessed by other classes.
I have tried placing a pointer in each of the classes then making them all equal a variable placed in the int main() and passed to the constructors.
The problem with the above is that it continualy segmentation faults when I try to do some work with the main class.
Now back to the problem I am asking for help with is that if I only use the global variable once it seems to work fine, though if I use it in another class then the linker compaines and states that there are multiple definitions in each of the .o files that are being linked.
The compiler and linker that I am using are the GNU C/C++ compiler provided with Slackware 8.1 ( I forget which version that it is ).
Any help will be greatly apreciated.