pointers and structures

%u asmasm at hotmail.com
Sun Apr 17 10:17:51 PDT 2011


what is the equivalent for this code in D?

#include <stdio.h>

	main()
	{
		struct S { int i; };
		struct S s, *s_ptr;

		s_ptr = &s;
		s_ptr->i = 9;

		printf("%d\n", s_ptr->i);
        }


More information about the Digitalmars-d-learn mailing list