G
Guest
I have a function that passes a string class pointer to a function, this
function is then suppose to fill it and the outer function uses it. But I
believe that I am running into problem due to manged memory. Because it has
value in inner function, but does not have the assigned value in outher
function. So I need to know how to declare this variable and make
assignments correctly so that it will have value when it is back in outher
function: Below is basically how I am currently calling.
I am using .NET 2003 C++
func1 () {
String *empcode;
empcode = new String ("0");
func2(empcode)
}
func2(String *empcode) {
empcode = "empcode value";
}
I have tried it with and without the new String("0") line in func1
Thangs for your help
function is then suppose to fill it and the outer function uses it. But I
believe that I am running into problem due to manged memory. Because it has
value in inner function, but does not have the assigned value in outher
function. So I need to know how to declare this variable and make
assignments correctly so that it will have value when it is back in outher
function: Below is basically how I am currently calling.
I am using .NET 2003 C++
func1 () {
String *empcode;
empcode = new String ("0");
func2(empcode)
}
func2(String *empcode) {
empcode = "empcode value";
}
I have tried it with and without the new String("0") line in func1
Thangs for your help