[疑难] 大虾帮我看看

jinheking 2007-03-30
我想写一个String类,但是居然编译不过去,我又看不出什么问题
麻烦那位解释一下
import std.c.stdio;

class  String{
private final char[] value;

/** The offset is the first index of the storage that is used. */
private final int offset;

/** The count is the number of characters in the String. */
private final int count;   

/*
* Initializes a newly created {@code String} object so that it represents
* an empty character sequence.  Note that use of this constructor is
* unnecessary since Strings are immutable.
*/
this(){
this.offset = 0;
this.count = 0;
this.value = new char[0];
}
}
jinheking 2007-03-30
问题解决了些这样一个函数就OK!
public static void  main() {    
   String str = new String;
}
Global site tag (gtag.js) - Google Analytics