www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - minor std.file documentation bug

reply J C Calvarese <jcc7 cox.net> writes:
In the std.file section on http://www.digitalmars.com/d/phobos.html, the 
description of getcwd shows an argument:

char[] getcwd(char[] name)


Well, there the compiler won't accept an argument (and I don't know what 
kind of argument it would expect anyways).

It should be:
char[] getcwd()


=================================

Here's an example:

import std.file;
import std.c.stdio;


void main()
{
//    printf("%.*s\n\n", getcwd("hmm")); /* doesn't compile */
     printf("%.*s\n\n", getcwd()); /* returns the current directory */
}

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
Jun 01 2004
parent "Walter" <newshound digitalmars.com> writes:
"J C Calvarese" <jcc7 cox.net> wrote in message
news:c9jbnn$31a1$1 digitaldaemon.com...
 In the std.file section on http://www.digitalmars.com/d/phobos.html, the
 description of getcwd shows an argument:

 char[] getcwd(char[] name)
 It should be:
 char[] getcwd()

Good catch. Thanks.
Jun 02 2004