digitalmars.D.learn - std.stdio not found?
- akcom (15/15) Dec 27 2005 module Test;
- akcom (4/22) Dec 27 2005 I forgot to mention that I was using Ares, I'm assuming that is the
- Derek Parnell (19/42) Dec 27 2005 I can't help you with the Ares problem. Does it work when *not* using Ar...
- John Reimer (3/26) Dec 27 2005 I don't think Ares contains the function writefln, at the moment.
module Test; import std.stdio; //import std.c.stdio; int main( char [][]args ) { for ( int i = 0; i < args.length; i++ ) { writefln( "argument[%u] = \"%s\"\n", i, cast( char * )args[i] ); } return 0; } when I try to compile that, I get the following error: "module stdio cannot read file 'std\stdio.d' when I comment out the first import statement and uncomment the second, I am told that writefln is undefined, any ideas?
Dec 27 2005
akcom wrote:module Test; import std.stdio; //import std.c.stdio; int main( char [][]args ) { for ( int i = 0; i < args.length; i++ ) { writefln( "argument[%u] = \"%s\"\n", i, cast( char * )args[i] ); } return 0; } when I try to compile that, I get the following error: "module stdio cannot read file 'std\stdio.d' when I comment out the first import statement and uncomment the second, I am told that writefln is undefined, any ideas?I forgot to mention that I was using Ares, I'm assuming that is the problem? (not to mention I just found out I don't have to use char pointer cast)
Dec 27 2005
On Tue, 27 Dec 2005 17:49:12 -0500, akcom wrote:akcom wrote:I can't help you with the Ares problem. Does it work when *not* using Ares? Also, here is a more "D"-ish version of your code... import std.stdio; int main( char [][]args ) { foreach ( int i, char[] s; args ) { writefln( `argument[%d] = "%s"`, i, s ); } return 0; } -- Derek (skype: derek.j.parnell) Melbourne, Australia "A learning experience is one of those things that says, 'You know that thing you just did? Don't do that.'" - D.N. Adams 28/12/2005 10:13:43 AMmodule Test; import std.stdio; //import std.c.stdio; int main( char [][]args ) { for ( int i = 0; i < args.length; i++ ) { writefln( "argument[%u] = \"%s\"\n", i, cast( char * )args[i] ); } return 0; } when I try to compile that, I get the following error: "module stdio cannot read file 'std\stdio.d' when I comment out the first import statement and uncomment the second, I am told that writefln is undefined, any ideas?I forgot to mention that I was using Ares, I'm assuming that is the problem? (not to mention I just found out I don't have to use char pointer cast)
Dec 27 2005
akcom wrote:akcom wrote:I don't think Ares contains the function writefln, at the moment. -JJRmodule Test; import std.stdio; //import std.c.stdio; int main( char [][]args ) { for ( int i = 0; i < args.length; i++ ) { writefln( "argument[%u] = \"%s\"\n", i, cast( char * )args[i] ); } return 0; } when I try to compile that, I get the following error: "module stdio cannot read file 'std\stdio.d' when I comment out the first import statement and uncomment the second, I am told that writefln is undefined, any ideas?I forgot to mention that I was using Ares, I'm assuming that is the problem? (not to mention I just found out I don't have to use char pointer cast)
Dec 27 2005