fork download
  1. Class Vector () {
  2. int x;
  3. int y;
  4. this(int X, int Y) {
  5. x = X;
  6. y = Y;
  7. }
  8. }
  9.  
  10. void main () {
  11. Vector A = new Vector (5,4);
  12. A.x = 3;
  13. writefln("%d %d", A.x,A.y);
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.d(4): found 'X' when expecting '.' following 'int'
prog.d(4): found ',' when expecting identifier following 'int.'
prog.d(4): found 'int' when expecting ','
prog.d(4): found '{' when expecting ';' following 'statement'
prog.d(8): unrecognized declaration
stdout
Standard output is empty