I am sure nothing is new here and I may have thought of this before but
it was a revelation today. :)
I've been trying to come up with a way of storing arbitrary number of
objects of arbitrary types, which means I would be using a ubyte array.
But then how do I use the data later without need
On 9/7/22 16:24, Synopsis wrote:
> a- What is the difference with this syntax with the exclamation mark?
> ```readf!"%s\n"(f1.num);```
That's the templated version, which is safer because it checks at
compile time (important distinction) that the arguments and the format
specifiers do match.
On 08/09/2022 11:24 AM, Synopsis wrote:
On Wednesday, 7 September 2022 at 23:06:44 UTC, rikki cattermole wrote:
Text in buffer: "123\n"
Read: "123"
Text in buffer: "\n"
Read: exception, expecting number for "\n"
Changing your readf format specifier to include the new line should work.
https:
On Wednesday, 7 September 2022 at 23:06:44 UTC, rikki cattermole
wrote:
Text in buffer: "123\n"
Read: "123"
Text in buffer: "\n"
Read: exception, expecting number for "\n"
Changing your readf format specifier to include the new line
should work.
https://dlang.org/phobos/std_stdio.html#.File
Text in buffer: "123\n"
Read: "123"
Text in buffer: "\n"
Read: exception, expecting number for "\n"
Changing your readf format specifier to include the new line should work.
https://dlang.org/phobos/std_stdio.html#.File.readf
On Wednesday, 7 September 2022 at 23:01:34 UTC, Mike Parker wrote:
On Wednesday, 7 September 2022 at 20:23:03 UTC, Injeckt wrote:
Convert it to D:
extern(C) const(char)* inet_ntop(int af, const(void)* src,
char* dst, socklen_t size);
Win32 API functions need to be `extern(Windows)`.
You
On Wednesday, 7 September 2022 at 22:57:53 UTC, Loara wrote:
On Wednesday, 7 September 2022 at 20:23:03 UTC, Injeckt wrote:
On Wednesday, 7 September 2022 at 19:38:52 UTC, H. S. Teoh
wrote:
On Wed, Sep 07, 2022 at 06:11:14PM +, Injeckt via
Digitalmars-d-learn wrote:
You need to link the
On Wednesday, 7 September 2022 at 20:23:03 UTC, Injeckt wrote:
Convert it to D:
extern(C) const(char)* inet_ntop(int af, const(void)* src,
char* dst, socklen_t size);
Win32 API functions need to be `extern(Windows)`.
You probably also need:
alias socklen_t = ...;
https://githu
Hi! I'm new at programming, just discovered D and I'm loving it
so far!
I'm learning the basics, so please forgive my noob mistakes and
questions (as well as my Engrish...).
I'm trying to make this program print both numbers entered by the
user, it works with the first number (num):
```d
i
On Wednesday, 7 September 2022 at 20:23:03 UTC, Injeckt wrote:
On Wednesday, 7 September 2022 at 19:38:52 UTC, H. S. Teoh
wrote:
On Wed, Sep 07, 2022 at 06:11:14PM +, Injeckt via
Digitalmars-d-learn wrote:
I need to include this Ws2tcpip.h header file to my project.
How can I do this? It's
On 9/7/22 4:23 PM, Injeckt wrote:
On Wednesday, 7 September 2022 at 19:38:52 UTC, H. S. Teoh wrote:
On Wed, Sep 07, 2022 at 06:11:14PM +, Injeckt via
Digitalmars-d-learn wrote:
I need to include this Ws2tcpip.h header file to my project. How can
I do this? It's all because I need inet_ntop
On Wednesday, 7 September 2022 at 20:23:03 UTC, Injeckt wrote:
_inet_ntop". I guess I can add my utils.c to my .d project when
I compile project and I need write in this file function
wrapper of inet_ntop.
No, it doesn't work. Jesus I need to figure out how to add
WS2tcpip.h
On Wednesday, 7 September 2022 at 19:38:52 UTC, H. S. Teoh wrote:
On Wed, Sep 07, 2022 at 06:11:14PM +, Injeckt via
Digitalmars-d-learn wrote:
I need to include this Ws2tcpip.h header file to my project.
How can I do this? It's all because I need inet_ntop function
from this header file.
On Wed, Sep 07, 2022 at 06:11:14PM +, Injeckt via Digitalmars-d-learn wrote:
> I need to include this Ws2tcpip.h header file to my project. How can I
> do this? It's all because I need inet_ntop function from this header
> file.
If that's the only function you need, you can just copy the decla
I need to include this Ws2tcpip.h header file to my project. How
can I do this? It's all because I need inet_ntop function from
this header file.
On Wednesday, 7 September 2022 at 10:50:17 UTC, Dennis wrote:
On Wednesday, 7 September 2022 at 10:14:22 UTC, Injeckt wrote:
I guess you right. But I don't know how i gonna link libs when
I'm using "dmd main.d".
Another way is to add this to your code:
```D
pragma(lib, "User32");
```
Oh tha
On Wednesday, 7 September 2022 at 10:14:22 UTC, Injeckt wrote:
I guess you right. But I don't know how i gonna link libs when
I'm using "dmd main.d".
Another way is to add this to your code:
```D
pragma(lib, "User32");
```
On Wednesday, 7 September 2022 at 10:31:02 UTC, rikki cattermole
wrote:
On 07/09/2022 10:14 PM, Injeckt wrote:
On Wednesday, 7 September 2022 at 10:01:11 UTC, rikki
cattermole wrote:
You have probably forgotten to link against user32.
I guess you right. But I don't know how i gonna link lib
On 07/09/2022 10:14 PM, Injeckt wrote:
On Wednesday, 7 September 2022 at 10:01:11 UTC, rikki cattermole wrote:
You have probably forgotten to link against user32.
I guess you right. But I don't know how i gonna link libs when I'm using
"dmd main.d". Tell me please.
I think it is as simpl
On Wednesday, 7 September 2022 at 00:31:53 UTC, zjh wrote:
On Tuesday, 6 September 2022 at 19:44:23 UTC, jmh530 wrote:
.
`xmake` is simpler.
Ok...but I didn't write the library so I can't exactly tell them
to use xmake when they already use cmake.
On Wednesday, 7 September 2022 at 10:01:11 UTC, rikki cattermole
wrote:
You have probably forgotten to link against user32.
I guess you right. But I don't know how i gonna link libs when
I'm using "dmd main.d". Tell me please.
Thanks Paul. Gotta wrap my head around this well enough to update
that module. However, this is a great start. Thank you very much.
--anonymouse
You have probably forgotten to link against user32.
Hi guys, I have an issue when I compile program with using
windows api, I got this message:
"reference to an unresolved external symbol _MessageBoxW@16". I
just created simple hello world using winapi and MessageBox.
import core.runtime;
import std.stdio;
import std.string;
impo
24 matches
Mail list logo