Function: String params call by reference?
In a function with prototype: func(blah, string[], strlen)
modifying this string[] in the function will affect the string in the calling subroutine? -Mug |
if its a global string
|
Ugh, so this wont work?
Code:
If not how might I rewrite func1 so that it returns a string value, I tried this earlier and kept getting various string related errors... Thanks, Mug |
Freecode, are you sure about your statement? Case in point:
Calls to get_user_name(id, name, len) treat name as call by reference and modify the calling variable in place, whether it is global or defined locally... Anyone have the answer to my original question, or does thre above answer it? :) Thanks, Mug |
AFAIK, arrays are passed by reference, and should be modifyiable from the function. I'm not 100% sure though.
|
Gotcha, thanks. :)
-Mug |
| All times are GMT -4. The time now is 17:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.