digitalmars.D - std.stream
- novice2 (17/17) Mar 16 2005 I have dmd 0.118 and need to parse string, contain xml.
- Ben Hinkle (10/27) Mar 16 2005 Use MemoryStream instead. It has a constructor that takes a char[] even
- novice2 (2/3) Mar 16 2005 Thank you very much!
I have dmd 0.118 and need to parse string, contain xml.
But all xml libraries i found using stream as input data.
So i need construct stream from char[].
I found in TArrayStream!(char[]) in std.stream.
But can't compile small test program.
Any advices?
private import std.stream;
void main()
{
char[] myString = "test string";
TArrayStream!(char[]) myStream = new TArrayStream!(char[]) (myString);
}
t.obj(t)
Error 42: Symbol Undefined _array_3std6stream
--- errorlevel 1
Mar 16 2005
"novice2" <novice2_member pathlink.com> wrote in message
news:d18p7o$d7e$1 digitaldaemon.com...
I have dmd 0.118 and need to parse string, contain xml.
But all xml libraries i found using stream as input data.
So i need construct stream from char[].
I found in TArrayStream!(char[]) in std.stream.
But can't compile small test program.
Any advices?
private import std.stream;
void main()
{
char[] myString = "test string";
TArrayStream!(char[]) myStream = new TArrayStream!(char[]) (myString);
}
t.obj(t)
Error 42: Symbol Undefined _array_3std6stream
--- errorlevel 1
Use MemoryStream instead. It has a constructor that takes a char[] even
though I notice that isn't listed in the doc. I will send Walter a update
for that.
The error using TArrayStream is probably due to building in debug mode but
linking against a non-debug build of phobos. So I'll probably remove
TArrayStream from the doc since it is a pain to work with (you must
pass -release to dmd). Either that or dmd.zip needs to include debug and
non-debug builds of phobos.
Mar 16 2005
Use MemoryStream insteadThank you very much! It works.
Mar 16 2005








novice2 <novice2_member pathlink.com>