Article View: fr.comp.lang.c
Article #15300Param�tre constant
From: Alain CROS
Date: Sat, 01 Oct 2005 15:48
Date: Sat, 01 Oct 2005 15:48
17 lines
1533 bytes
1533 bytes
Bonjour.
Dans une fonction d�clar�e :
int split(splitab *pt, char *c, const int taille, const char sep)
le *c est un pointeur sur une chaine de char.
Je voudrais faire �voluer le pointeur *c++ mais interdire la modification de la chaine en la d�clarant avec const.
Je ne trouve pas o� mettre le const.
const char *c et char const *c me donne :
[Warning] assignment discards qualifiers from pointer target type
char * const c me donne :
increment of read-only location
Merci.
Alain CROS
Technical Details
Message-ID:
<433eafec$0$18071$626a14ce@news.free.fr>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!blackbush.cw.net!cw.net!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!pe2.news.blueyonder.co.uk!blueyonder!proxad.net!infeed-2.proxad.net!news18-e.free.fr!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f9822,8be8da6b5abaf548,start X-Google-Attributes: gidf9822,public X-Google-Language: FRENCH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!blackbush.cw.net!cw.net!newsfeed01.sul.t-online.de!newsfeed00.sul.t-online.de!t-online.de!195.92.193.196.MISMATCH!nntp.theplanet.net!inewsm1.nntp.theplanet.net!pe2.news.blueyonder.co.uk!blueyonder!proxad.net!infeed-2.proxad.net!news18-e.free.fr!not-for-mail From: "Alain CROS" <Personne@ICI> Newsgroups: fr.comp.lang.c Subject: Param�tre constant Date: Sat, 1 Oct 2005 17:48:37 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Lines: 19 Message-ID: <433eafec$0$18071$626a14ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 01 Oct 2005 17:49:14 MEST NNTP-Posting-Host: 62.147.11.161 X-Trace: 1128181754 news18-e.free.fr 18071 62.147.11.161:1028 X-Complaints-To: abuse@proxad.net