I'm having a problem getting an object I have to pass to another class. I'm trying to have it pass the address to the new class, so I can still use the first instance of the object in the new class. I'm having troubles though, and can't seem to get it to compile. If you want to look, I've uploaded the whole project, I'm working in Sharp Develop.
in case you don't, heres an example of what i'm trying to do.
I have a class called opt in which I've created an object called o.
I have a second class called options that I want to pass the object into when I create an options object. The compiler complains about the managed code
Cannot take the address of, get the size of, or declare a pointer to a managed type ('cell_server.opt') (CS0208)
so I used unsafe. This still didn't work, so I tried creating a pointer before I passed it to the class which still didn't work.
Code:
opt *point = &o;
options OptionsWindow = new options(point);
I can't really see what I'm doing wrong, so any help would be greatly appreciated.