Error in Memento Sample Code?

02-12-29 whitefire
Have you tried to compile your sample code for the Memento design pattern? I don't think private member variables are open for access.

fuzhou
2002-12-30 14:12
那个Memento类是个私有的,那它是不是Originator的内部类,可是也好象不是?也请斑竹解惑

banq
2002-12-30 15:22
这当然,但是如果将Memento写入Originator作为内部类就可以了。

猜你喜欢