d/structcons/structcons.d
2013-02-15 23:06:34 -05:00

26 lines
332 B
D

import std.stdio;
struct Yoda
{
int one;
int two;
};
struct Second
{
int one;
int two;
this(int _one, int _two)
{
one = _two;
two = _one;
}
};
void main(string args[])
{
writefln("%s, %s", Yoda(1,2).one, Yoda(3,4).two);
writefln("%s, %s", Second(1,2).one, Second(3,4).two);
}