Dynamic arrays / ~= giving an exception...

Cym13 cpicard at openmailbox.org
Sun Jul 1 21:05:43 UTC 2018


On Sunday, 1 July 2018 at 20:55:16 UTC, Robert M. Münch wrote:
> I'm a bit puzzled because I think this is pretty straight 
> forward but doesn't work...
>
> struct mystruct {
> 	myPtr* root;
>
> 	opApply(...){
> 		myPtr*[] childs;
> 		
> 		childs ~= root;
> 		...
> 	}
> }
>
> foreach(node; mystruct(myRoot)){
> 	...
> }
>
> It compiles but the line with ~= gives the nice "bing" under 
> Windows and the application hangs...
>
> What doesn't this work?

Could you maybe provide a compilable example?


More information about the Digitalmars-d-learn mailing list