Re: Windows Defender won't let me install DMD

2019-02-19 Thread belkin via Digitalmars-d-learn
On Monday, 18 February 2019 at 19:34:31 UTC, Seb wrote: On Monday, 18 February 2019 at 16:32:26 UTC, belkin wrote: I am trying to install the compiler and get started on learning D again ( attempted and stopped way back ) This is the error message I am getting. I am on Windows 10. Windows

Windows Defender won't let me install DMD

2019-02-18 Thread belkin via Digitalmars-d-learn
I am trying to install the compiler and get started on learning D again ( attempted and stopped way back ) This is the error message I am getting. I am on Windows 10. Windows Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk. App:

How to define and use a custom comparison function

2014-06-15 Thread belkin via Digitalmars-d-learn
I am new to D so I am probably not using the right terminology but here is a piece of C++ code (not complete) that I would like to translate to idiomatic D. I have defined a function object that I pass to std::sort to std:map as follows: enum class SortOrder{ ASC, DESC }; typedef

Basics of calling C from D

2014-06-11 Thread belkin via Digitalmars-d-learn
Example: I have this C function that is compiled into a library //File: factorial.h int factorial(int n); //File: factorial.c #include factorial.h int factorial(int n) { if(n!=1) return n*factorial(n-1); } Question: How do I use it from D?

Re: Basics of calling C from D

2014-06-11 Thread belkin via Digitalmars-d-learn
On Wednesday, 11 June 2014 at 14:02:08 UTC, John Colvin wrote: On Wednesday, 11 June 2014 at 13:52:09 UTC, belkin wrote: Example: I have this C function that is compiled into a library //File: factorial.h int factorial(int n); //File: factorial.c #include factorial.h int factorial(int n) {

Re: Basics of calling C from D

2014-06-11 Thread belkin via Digitalmars-d-learn
On Wednesday, 11 June 2014 at 14:22:51 UTC, Adam D. Ruppe wrote: On Wednesday, 11 June 2014 at 14:11:04 UTC, simendsjo wrote: I believe the correct answer should be Buy my book!. ah, of course! I should just make a .sig file lol