我有三个class级: class A {}; class B : virtual public A {}; class C : virtual public A {}; class D: public B, public C {}; 试图从A *到B *静态转换我得到以下错误: cannot convert from base A to derived type B via virtual base A
在Swift中给出以下内容: var optionalString: String? let dict = NSDictionary() 以下两种说法有什么实际区别: optionalString = dict.objectForKey("SomeKey") as? String VS optionalString = dict.objectForKey("SomeKey") as! String?