Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!psuvm!barilvm!p88036 From: P88036@BARILVM.BITNET (Ephraim Vider) Newsgroups: comp.windows.ms Subject: Re: 2 questions: _argv and radio buttons Message-ID: <91002.175322P88036@BARILVM.BITNET> Date: 2 Jan 91 15:53:22 GMT References: <136@mixcom.UUCP> <1990Dec27.224724.8404@progress.com> Organization: Bar-Ilan University Computing Center, Israel Lines: 31 In article <1990Dec27.224724.8404@progress.com>, billf@progress.COM (Bill Ferro) says: > > >I found that Windows "extern char *__argv[]" is actually a pointer to >the real argv. In my case, in WinMain, I call a MAIN procedure. The >code goes something like this: > extern char *__argv[]; > extern char __argc; > > ... > main(__argc,(char **)*__argv); > ... > >-bf > Well, there is obviously a mistake in the docomentation, but here is the correct answer: __argc is really extern char **__argc this means that __argc is not the name of an array, but a variable containing a pointer to a pointer to char. The latter tells the compiler it has to do three levels of indirection to get to the actual char, while the former implies only two. Hence the suggested solution works, but it is not elegant nor necessary. I suppose this should be done on comp.lang.c or something, but the question was originated here... Hope this clears the fog, Ephraim Vider p88035@barilvm