Design question dealing with char* function
- From: fernandez.dan@xxxxxxxxx
- Date: 28 Jul 2005 08:50:05 -0700
My question is about if I should return char* or have a char* as an
argument. My basic premise for this function is to return a char*
buffer and the size of the buffer to the caller. I know that each of
the following works but Stylistic which would be the better approach.
Here are my two examples:
char* GetBuffer(long* size);
or
void GetBuffer(char* buff, long* size);
Thanks
Danny
.
- Follow-Ups:
- Re: Design question dealing with char* function
- From: Jack Klein
- Re: Design question dealing with char* function
- From: David Resnick
- Re: Design question dealing with char* function
- Prev by Date: Re: Use of 'extern' keyword
- Next by Date: Re: Design question dealing with char* function
- Previous by thread: malloc modifying a passed string
- Next by thread: Re: Design question dealing with char* function
- Index(es):
Relevant Pages
|