From: Tom Newsgroups: comp.os.msdos.djgpp Subject: Re: Info help, please! Date: Mon, 5 Jan 1998 11:59:56 +0000 Organization: None whatsoever Distribution: world Message-ID: References: NNTP-Posting-Host: sunholme.demon.co.uk MIME-Version: 1.0 Lines: 47 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , Ivo Stoykov writes >Hello > >I have a (dull for someone) question: > What does it mean the term VOID? When used in conjunction with a function, eg: void jim(int fred) it means the function does not return a value. When used in the parameter list, eg: int sheila(void) it means the function does not take *any* parameters. Not that under C, this is different from int sheila() which means that the function takes an unknown number of parameters. Under C++, however, it has the same meaning as int sheila(void) above. When used for pointers, it indicates that the pointer has no particular type. To access data stored at its address, you must use a typecast, thus. Void pointers are useful, firstly because they can point to any type of data, and secondly because they can be assigned to any pointer variable (and vice-versa) without a warning. This is why malloc returns a void *. >PS.: Is there a function returning the (DOS) root path? I found few >giving information about current dir & drive but not for current >root. If you are looking for the root directory of the current drive, just add to the drive letter a colon, followed by a backslash "\" or a slash "/" (which is not a backslash). If you mean the path the program was invoked from, the first parameter (argv[0] that is) contains the full pathname of the program. You can use one of the fnsplit()-type functions, found in dir.h I think, to extract the drive and path from this. --Tom My real e-mail address is tom AT sunholme DOT demon DOT co DOT uk