dmd Questions
2
Solved
For a while I was confused about the direction of D's operator overloading, but now I realize it's a beautiful system... if It would only work with core types (int, float, etc). Consider the follow...
Clothing asked 19/10, 2011 at 19:20
1
Solved
import std.stdio;
void main(){
int n;
while(readf("%d", &n)){
if(n == 11)
break;
writeln(n);
}
}
The first iteration works, and it prints n, but after that readf() never retu...
1
Solved
The template documentation for D includes a small section called "Template Constructors". That section doesn't have any example or extensive documentation.
I'm attempting to use that feature (I'm ...
Limon asked 1/7, 2011 at 22:54
2
Solved
Here is a simple program that reads lines from stdin and outputs them to stdout.
module test;
import std.stdio;
void main(string[] args)
{
foreach (int i, string line; lines(stdin)) {
write...
1
Solved
According to the documentation, readf is supposed to return a uint. But even this simple example fails to compile:
hello.d
import std.stdio;
void main() {
int x;
uint r = readf("%s", &x); ...
2
Solved
I'd really like to get more into D, but the lack of good library support is really hindering me. Therefore I'd like to create some D bindings for existing C libraries I'd like to use. I've never do...
2
Solved
I installed dmd (2.0 ?) using the windows installer and am trying to compile the following program:
module tcpechoserver;
import std.stdio;
const int MAXPENDING = 5;
int main(char[][] argv)
{
...
3
Solved
I am reading the book from Andrei Alexandrescu about the D programming language. He's an excellent writer and does a pretty good job at explaining aspects of the D language. I however find certain ...
4
Solved
This may sound really stupid. but I've got a strange problem with the D programming language. When I try to create a new array like this:
import std.stdio;
void main()
{
char[] variable = "value...
© 2022 - 2024 — McMap. All rights reserved.