I'm currently writing lab work for my study, and I'd like to make a function return a pointer to the variable from the same class.
int* getProc(int id)
{
switch (id)
{
case 1:
return &this.proc1tasks;
break;
case 2:
return &this.proc2tasks;
break;
}
}
But for every &this.proc#tasks VS 2013 says
Error 2 Pointers and fixed size buffers may only be used in an unsafe context
Is there any way to make it work as I imagined?
unsafekeyword.