Re: How can I concatenate a string, a char array and an int

2016-11-30 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 15:01:37 UTC, Anders S wrote: Thanks guys for a really quick answer !! OK, a little bit awkward to use but getting there posting a new question about char * to struct ;) Thanks /anders Also: import std.conv : text; string temp = "This is a number"; string

Re: How can I concatenate a string, a char array and an int

2016-11-29 Thread Anders S via Digitalmars-d-learn
Thanks guys for a really quick answer !! OK, a little bit awkward to use but getting there posting a new question about char * to struct ;) Thanks /anders

Re: How can I concatenate a string, a char array and an int

2016-11-29 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 10:21:24 UTC, Anders S wrote: Hi guys, just started to get into Dlang, comming from C and C++ I like to use methods like there if possible. Now I want to catenate something like this, but don't get it to work in standard C i code: char str[80];

Re: How can I concatenate a string, a char array and an int

2016-11-29 Thread rumbu via Digitalmars-d-learn
On Tuesday, 29 November 2016 at 10:21:24 UTC, Anders S wrote: Hi guys, just started to get into Dlang, comming from C and C++ I like to use methods like there if possible. Now I want to catenate something like this, but don't get it to work in standard C i code: char str[80];

How can I concatenate a string, a char array and an int

2016-11-29 Thread Anders S via Digitalmars-d-learn
Hi guys, just started to get into Dlang, comming from C and C++ I like to use methods like there if possible. Now I want to catenate something like this, but don't get it to work in standard C i code: char str[80]; sprintf(str, "This is a number = %f", 3.14356); Now in Dlang and