What does const char *s mean? is s a constant or *s?
From: G Patel (gaya.patel_at_gmail.com)
Date: 01/24/05
- Next message: E. Robert Tisdale: "Re: Superbasic efficiency question"
- Previous message: Sethalicious: "Re: Superbasic efficiency question"
- Next in thread: Mike Wahler: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Mike Wahler: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Chris Torek: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Michael Mair: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: pete: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Jonathan Burd: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Karthik Kumar: "Re: What does const char *s mean? is s a constant or *s?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Jan 2005 22:56:23 -0800
I've been looking at some code for string functions (certain
implementation of them) and the non modified string is usually declared
as a const char *s in the parameter list.
I was wondering, what exactly does that mean. Does that mean the
function is restricted from changing the address (changing s) or
changing what's being pointed to (*s)?
- Next message: E. Robert Tisdale: "Re: Superbasic efficiency question"
- Previous message: Sethalicious: "Re: Superbasic efficiency question"
- Next in thread: Mike Wahler: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Mike Wahler: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Chris Torek: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Michael Mair: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: pete: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Jonathan Burd: "Re: What does const char *s mean? is s a constant or *s?"
- Reply: Karthik Kumar: "Re: What does const char *s mean? is s a constant or *s?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]