www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++.windows.32-bits - __argv and __argc in DMC

↑ ↓ ← Peter Thun <peter.thun gmx.net> writes:
Hi.

Some windows compilers like Visual C++ and MinGW offer __argv and __argc 
to access the command line arguments in "WinMain-applications".

I tried this on DMC but I get an "undefined identifier" error.

But after this I looked in tchar.h and found:

#define __targv		__argv
#define __targv		__wargv

Hmmm, did they forgot to delete this from the header-file or is there a 
possibility to use it?
Jul 22 2004
↑ ↓ → Peter Thun <peter.thun gmx.net> writes:
Peter Thun wrote:
 Hi.
 
 Some windows compilers like Visual C++ and MinGW offer __argv and __argc 
 to access the command line arguments in "WinMain-applications".
 
 I tried this on DMC but I get an "undefined identifier" error.
 
 But after this I looked in tchar.h and found:
 
 #define __targv        __argv
 #define __targv        __wargv
 
 Hmmm, did they forgot to delete this from the header-file or is there a 
 possibility to use it?

Oh sorry. Problem solved. I forgot to include windows.h. I didn't knew that this is required. :-) cya
Jul 22 2004