|
-
April 8th, 1999, 06:21 PM
#1
Simple as hell
Hello.
Here is a very simple question. My function is defined as:
char * myfunc (void);
My function prepares some text and want to pass it. I would like at first to send the whole text, so I have the possibilites:
1. static char szText [1000] and then return the pointer.
2. define char szText [1000] globally.
3. use CString object.
I wouldn't like to use CString and I guess there is some trick programs use in this case. The best solution I have in the list is to use static, but I don't want it to take the memory forever. I don't want to use calloc in one function and free in another as well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|