On Wednesday, June 26, 2019 8:39:09 AM MDT Nicholas Wilson via Digitalmars-
d-learn wrote:
> On Wednesday, 26 June 2019 at 13:57:22 UTC, Gilbert Fernandes
> > None do help. The option "override linker settings from sc.ini"
>
> it may be called dmd.conf (it is on my Mac, but the windows may
> be dif
Hello World!
I am new at D, I'm making a sudoku solver in D, I wanted to add
the option to read sudoku from a .txt file.
I am finding a bit confusing how to open, read and close files in
D.
I am trying to mimic the C code:
FILE *f_in;
f_in=fopen("sudoku.txt");
if (f_in==NULL){
exit(1);
}
wh
On Thursday, 27 June 2019 at 13:31:23 UTC, Tabamon wrote:
I am new at D, I'm making a sudoku solver in D, I wanted to add
the option to read sudoku from a .txt file.
1) try to google "dlang read text file", most probably 1,2,3 link
will help to u.
2) https://dlang.org/library/std/file/read_te
On Thursday, 27 June 2019 at 13:52:43 UTC, a11e99z wrote:
On Thursday, 27 June 2019 at 13:31:23 UTC, Tabamon wrote:
1) try to google "dlang read text file", most probably 1,2,3
link will help to u.
2) https://dlang.org/library/std/file/read_text.html
string content = readText( fileName );
https://forum.dlang.org/thread/osnema$d5s$1...@digitalmars.com
dll support is it ok now?
i cant find the docs on thatm
On Thursday, 27 June 2019 at 05:57:49 UTC, evilrat wrote:
On Thursday, 27 June 2019 at 05:37:08 UTC, ChangLoong wrote:
If I want call cpp class constructer without new method, is
there a way to do that ?
If what you really want is to actually allocate using C++ new
operator from D, then that
Is it possible to set the default values for the Main function's
arguments?
It seems that I'm getting Range error.
import std.stdio : writeln;
void main(string[] args = ["asdsfasdf", "asdklfajsdk",
"asdfasdfasd"]){
writeln("", args[1]);
}
Output:
vaidas@vaidas-SATELLITE-L855:~/Desktop$
On Thursday, 27 June 2019 at 17:05:05 UTC, Vaidas wrote:
Is it possible to set the default values for the Main
function's arguments?
No, as far as the language is concerned, a value is always being
passed from the operating system, so those default values would
never trigger.
What you could
On Thursday, 27 June 2019 at 17:05:05 UTC, Vaidas wrote:
Is it possible to set the default values for the Main
function's arguments?
It seems that I'm getting Range error.
import std.stdio : writeln;
void main(string[] args = ["asdsfasdf", "asdklfajsdk",
"asdfasdfasd"]){
writeln("", args
On Thursday, 27 June 2019 at 17:20:37 UTC, Paul Backus wrote:
void main(string[] args)
{
string[] defaultArgs = ["my", "default", "arguments"];
if (args.length == 0) {
args = defaultArgs;
}
// Process args...
}
Correction: you should check for `args.length == 1`, since (
On Thursday, 27 June 2019 at 17:05:05 UTC, Vaidas wrote:
Is it possible to set the default values for the Main
function's arguments?
It seems that I'm getting Range error.
import std.stdio : writeln;
void main(string[] args = ["asdsfasdf", "asdklfajsdk",
"asdfasdfasd"]){
writeln("", args
On Thursday, 27 June 2019 at 17:22:36 UTC, Paul Backus wrote:
On Thursday, 27 June 2019 at 17:20:37 UTC, Paul Backus wrote:
void main(string[] args)
{
string[] defaultArgs = ["my", "default", "arguments"];
if (args.length == 0) {
args = defaultArgs;
}
// Process args...
}
On Thursday, 27 June 2019 at 16:56:00 UTC, fred wrote:
https://forum.dlang.org/thread/osnema$d5s$1...@digitalmars.com
dll support is it ok now?
i cant find the docs on thatm
Not much better.
For somebody who isn't familiar - what's the issue exactly?
On Thursday, 27 June 2019 at 17:00:01 UTC, Rémy Mouëza wrote:
I though support for C++ allocation had improved. In a recent
release, there was the addition of core.stdcpp.new, but I
didn't try it out:
- http://dpldocs.info/experimental-docs/core.stdcpp.new_.html
- https://en.cppreference.com/
15 matches
Mail list logo