delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/29/08:45:35

Message-ID: <377805DE.7B9B5256@unb.ca>
From: Endlisnis <s257m AT unb DOT ca>
Organization: Nortel Networks
X-Mailer: Mozilla 4.51 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Command line help
References: <19990628180854 DOT 22728 DOT 00000973 AT ng-ch1 DOT aol DOT com>
Lines: 30
Date: Mon, 28 Jun 1999 23:31:07 GMT
NNTP-Posting-Host: 209.226.124.235
X-Trace: news20.bellglobal.com 930612667 209.226.124.235 (Mon, 28 Jun 1999 19:31:07 EDT)
NNTP-Posting-Date: Mon, 28 Jun 1999 19:31:07 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

FixAllPCs wrote:

> Why doesn't this work?
>
> #include <iostream.h>
>
> int main(int argc, char argv[])

int main(int argc, char* argv[])

>
> {
>     int loop;
>     for(loop = 0; loop < argc; loop++)
>     {
>         cout<<"argv["<<loop<<"]: "<<argv[loop]<<endl;
>     }
>     return 0;
> }

    The 2nd argument is a char*[], not a char[].


--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT HotMail DOT com
          ICQ: 32959047


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019