I have some old code I'm trying to work with and I need a function to return a name, so for example:
[source]
int cApp::ReturnInt(int &Temp)
{
Temp=5;
return 6;
}
... later code...
int A,B;
A=ReturnInt(B);
[/source]
Returns A=5 and B=6
Now I need to do this with a char[] name, like this somehow:
[source]
char[20] cApp::ReturnInt(char[30] &Temp)
{
strcpy_s(Temp, "123"); //Add 123 into Temp
return "456";
}
... later code...
char[20] A,B;
A=ReturnInt(B);
[/source]
Which doesn't work of course, but I hope you get the gist of what I'm trying to do... I don't need it to return the name both ways (using return and &) just any way...
It's too hard for me to update all the code to string but if you have the time I'd also like to see how it's done with string...
Hope this makes sense...
Thanks,
Vanz