Circular dependencies of declarations

前端 未结 6 1176
眼角桃花
眼角桃花 2021-01-19 05:02

I am trying to implement example of visitor pattern, but I have trouble with circular dependecies of declarations of classes. When I do forward declaration of class Visitor,

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-19 05:46

    Give all class type declaration before its usage .. i think it would work.

提交回复
热议问题