Re: Is D's GC.calloc and C's memset played the same role?

2014-12-25 Thread FrankLike via Digitalmars-d-learn
On Wednesday, 24 December 2014 at 12:53:06 UTC, JN wrote: I know this is probably a theoretical exercise, but easier way might be to execute tasklist and just grep the output. study D,you should do some exercises.

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-24 Thread JN via Digitalmars-d-learn
I know this is probably a theoretical exercise, but easier way might be to execute tasklist and just grep the output.

Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread FrankLike via Digitalmars-d-learn
Today,I meet a question:get all processes names. --C++ CODE- #include stdafx.h #include windows.h #include stdio.h//C standard I/O #include tlhelp32.h int _tmain(int argc, _TCHAR* argv[]) { HANDLE hProcessSnap=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread Daniel Kozak via Digitalmars-d-learn
FrankLike via Digitalmars-d-learn píše v Út 23. 12. 2014 v 15:37 +: Today,I meet a question:get all processes names. --C++ CODE- #include stdafx.h #include windows.h #include stdio.h//C standard I/O #include tlhelp32.h int _tmain(int argc, _TCHAR* argv[])

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread ketmar via Digitalmars-d-learn
On Tue, 23 Dec 2014 15:37:12 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: you will find the different: D: PROCESSENTRY32* pe32 = cast(PROCESSENTRY32*)GC.calloc(PROCESSENTRY32.sizeof); C++:PROCESSENTRY32 pe32; GC.calloc means: memset ?! do you see

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread FrankLike via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 20:22:12 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 23 Dec 2014 15:37:12 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: you will find the different: D: PROCESSENTRY32* pe32 =

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread ketmar via Digitalmars-d-learn
On Wed, 24 Dec 2014 00:24:44 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Tuesday, 23 December 2014 at 20:22:12 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 23 Dec 2014 15:37:12 + FrankLike via Digitalmars-d-learn