parse int error

Peter Eisenhower peter.eisenhower at gmail.com
Tue Oct 29 18:02:40 PDT 2013


I am confused as to why I cannot pass the return of the tag 
attribute directly into the parse int.

// This works
  string s = xml.tag.attr["key"];
  int key = parse!int(s);

// Compile error on these
int key = parse!int(xml.tag.attr["key"]);
int key = parse!int(cast(string) cml.tag.attr["key"]);


More information about the Digitalmars-d-learn mailing list