Article View: fr.comp.lang.c
Article #15027Re: accès à un élément de *argv[]
From: Emmanuel Delahaye
Date: Sat, 15 Oct 2005 12:11
Date: Sat, 15 Oct 2005 12:11
27 lines
1740 bytes
1740 bytes
Thierry B a �crit : > Quand on d�clare une fonction main comme ceci: d�finit... http://mapage.noos.fr/emdel/notes.htm#definitions > int main (int argc, char *argv[]) > > *argv[], repr�sente un tableau dont chaque �l�ment est un pointeur > vers une chaine de caract�re. Oui. > Je ne comprends pas pourquoi alors on acc�de � la valeur de chaque > �l�ment de ce tableau par argv[i] car si chaque �l�ment est un > pointeur, il faut utiliser une * pour avoir la vlaeur de ce pointeur > non? On peut mais c'est compliqu�. *(arg + i) Le C offre l'alternative 'index' (/subscript/ ou []) qui simplifie �norm�ment l'�criture. argv[i]
Technical Details
Message-ID:
<4350f1e5$0$4329$626a54ce@news.free.fr>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!infeed-3.proxad.net!nnrp9-1.free.fr!not-for-mailReferences:
<1129375708.461315.266570@g14g2000cwa.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,81ea3528af9bc77b X-Google-Attributes: gidf9822,public X-Google-Language: FRENCH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!infeed-3.proxad.net!nnrp9-1.free.fr!not-for-mail Date: Sat, 15 Oct 2005 14:11:04 +0200 From: Emmanuel Delahaye <emdelYOURBRA@noos.fr> User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: fr, en MIME-Version: 1.0 Newsgroups: fr.comp.lang.c Subject: Re: accès à un élément de *argv[] References: <1129375708.461315.266570@g14g2000cwa.googlegroups.com> In-Reply-To: <1129375708.461315.266570@g14g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Lines: 27 Message-ID: <4350f1e5$0$4329$626a54ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 15 Oct 2005 14:11:17 MEST NNTP-Posting-Host: 81.65.109.208 X-Trace: 1129378277 nnrp9-1.free.fr 4329 81.65.109.208:18172 X-Complaints-To: abuse@proxad.net