On Monday, 18 September 2023 at 02:49:37 UTC, vino wrote:
On Sunday, 17 September 2023 at 18:28:36 UTC, Joe wrote:
On Friday, 15 September 2023 at 16:55:34 UTC, Vino wrote:
[...]
[...]
char[] invalid = (cast(char*)malloc(char.sizeof *
len))[0..len];
This is not the way to go about it.
On Sunday, 17 September 2023 at 18:28:36 UTC, Joe wrote:
On Friday, 15 September 2023 at 16:55:34 UTC, Vino wrote:
[...]
[...]
char[] invalid = (cast(char*)malloc(char.sizeof * len))[0..len];
This is not the way to go about it. You are mixing "pointer
arrays" with "arrays".
[...]
Tha
On Friday, 15 September 2023 at 16:55:34 UTC, Vino wrote:
On Friday, 15 September 2023 at 15:27:00 UTC, Vino wrote:
On Friday, 15 September 2023 at 02:25:09 UTC, Joe wrote:
On Thursday, 14 September 2023 at 14:21:09 UTC, Vino wrote:
[...]
A pointer is a type that points to something. It's li
On Friday, 15 September 2023 at 15:27:00 UTC, Vino wrote:
On Friday, 15 September 2023 at 02:25:09 UTC, Joe wrote:
On Thursday, 14 September 2023 at 14:21:09 UTC, Vino wrote:
[...]
A pointer is a type that points to something. It's literally
that simple. Every piece of data and code exist so
On Friday, 15 September 2023 at 02:25:09 UTC, Joe wrote:
On Thursday, 14 September 2023 at 14:21:09 UTC, Vino wrote:
[...]
A pointer is a type that points to something. It's literally
that simple. Every piece of data and code exist somewhere in
memory. Every piece of memory has an address. T
On Thursday, 14 September 2023 at 14:21:09 UTC, Vino wrote:
Hi All,
Request your help to guide me in understanding about
pointers, the below code works,I have few question which i need
your help for better understanding.
Questions:1
```
char[] invalid = (cast(char*)malloc(char.sizeof *
l
On Thursday, 14 September 2023 at 17:23:53 UTC, Vino wrote:
On Thursday, 14 September 2023 at 15:33:45 UTC, Paul Backus
wrote:
On Thursday, 14 September 2023 at 14:21:09 UTC, Vino wrote:
Questions:1
```
char[] invalid = (cast(char*)malloc(char.sizeof *
length))[0..length];
```
The above state
On Thursday, 14 September 2023 at 15:33:45 UTC, Paul Backus wrote:
On Thursday, 14 September 2023 at 14:21:09 UTC, Vino wrote:
Questions:1
```
char[] invalid = (cast(char*)malloc(char.sizeof *
length))[0..length];
```
The above statement allocate memory for char type and the size
of the alloc
On Thursday, 14 September 2023 at 14:21:09 UTC, Vino wrote:
Questions:1
```
char[] invalid = (cast(char*)malloc(char.sizeof *
length))[0..length];
```
The above statement allocate memory for char type and the size
of the allocated memory is char.sizeof * length so what is the
use of this "[0.