Re: Another Understanding Pointers Question
From: Robert Bachmann (Robert.Bachmann_at_rbdev.net)
Date: 05/10/04
- Next message: Case: "Re: memcpy() and endianness"
- Previous message: Darrell Grainger: "Re: Our OWN 'Deep C Secrets'"
- In reply to: Materialised: "Another Understanding Pointers Question"
- Next in thread: Materialised: "Re: Another Understanding Pointers Question"
- Reply: Materialised: "Re: Another Understanding Pointers Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 10 May 2004 18:08:43 +0200
Materialised wrote:
> Hi everyone,
> I seen the post by Rob Morris, and thought that I would double check
> that I was using pointers in the correct way. So I written the following
> string functions to test. I know soem can be iumplimented using the
> standard libary, but I just wanted to test writing my own functions.
> They work ok, but I would like some feed back on any issues you can see
> with them etc
Just a minor note on your use of int.
As far as I think your string functions
will never work with negative values.
So you may want to consider using size_t instead.
> char *left(char *string, int count)
char *left(const char *string, size_t count)
etc.
Best regards,
Robert Bachmann
-- Robert.Bachmann@rbdev.net |) |) http://rb.rbdev.net |\.|).
- Next message: Case: "Re: memcpy() and endianness"
- Previous message: Darrell Grainger: "Re: Our OWN 'Deep C Secrets'"
- In reply to: Materialised: "Another Understanding Pointers Question"
- Next in thread: Materialised: "Re: Another Understanding Pointers Question"
- Reply: Materialised: "Re: Another Understanding Pointers Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|