Pointers to Dynamic Arrays

Freddy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 16 20:00:28 PDT 2015


On Monday, 17 August 2015 at 02:45:22 UTC, Brandon Ragland wrote:
> if(file[(*pos + i)] == '}'){
> 	*pos += i;
> 	return;
> }

That code doesn't do what you want it do. file is a ((char[])*) 
you are indexing the pointer(accessing invalid memory) and 
getting a char[].


More information about the Digitalmars-d-learn mailing list