From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: Array of poiters to an Array Date: Wed, 23 May 2001 12:09:19 -0400 Organization: Global Crossing Telecommunications Lines: 27 Message-ID: <9egn88$1eck$1@node21.cwnet.roc.gblx.net> References: NNTP-Posting-Host: 209-130-221-142.nas1.roc.gblx.net X-Trace: node21.cwnet.roc.gblx.net 990634057 47508 209.130.221.142 (23 May 2001 16:07:37 GMT) X-Complaints-To: abuse AT gblx DOT net NNTP-Posting-Date: Wed, 23 May 2001 16:07:37 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "NirinaMichel Ratoandromanana/DF" wrote in message news:fc DOT 000f77f3000fc133000f77f3000fc133 DOT fc1ae AT bni DOT mg... > Hi all, > > This question is about C and not about djgpp itself. How to add a string > to char * argv[] for example? > I tried: > strcpy (argv[i], "--Help"); > and I got something strange after. I don't think you should ever try to modify that thing that way. It's basically prepared by the OS and a pointer to the prepared array of pointers to prepared strings is passed to main. You may try to do it a bit differently, you don't modify original strings but instead you modify particular pointer to point to a string that you want. However, I'm not sure this is a right thing to do. Good Luck -- Alexei A. Frounze alexfru [AT] chat [DOT] ru http://alexfru.chat.ru http://members.xoom.com/alexfru/ http://welcome.to/pmode/