Re: Copying fread behaviour on char array
- From: "Ivanna Pee" <freak@xxxxxxxxxxxxxxxx>
- Date: 31 Mar 2006 07:11:06 -0800
Giox wrote:
Hello everybody I want to create a routine that mimic the fread
behavior operating on char array.
I wrote
size_t fread_char(void* buf, size_t sz, size_t n, char* string_source)
{
memcpy(buf, string_source, sz*n);
string_source += n*sz;
return n;
}
When I leave the routine the string_source doesn't change its value, it
seems that the operation string_source += n*sz; has not been performed
Hint : Use
size_t fread_char(void* buf, size_t sz, size_t n, char**
string_source)
.
- Follow-Ups:
- Re: Copying fread behaviour on char array
- From: Giox
- Re: Copying fread behaviour on char array
- References:
- Copying fread behaviour on char array
- From: Giox
- Copying fread behaviour on char array
- Prev by Date: need help with COM in C
- Next by Date: Re: need help with COM in C
- Previous by thread: Copying fread behaviour on char array
- Next by thread: Re: Copying fread behaviour on char array
- Index(es):
Relevant Pages
|