Ayanami
칼리
- Reaction score
- 288
So I have 2 structs, Struct A and Struct B. I want it so that Struct B can access Struct A's private members, but only Struct B.
Is there a way to do this?
JASS:
struct A
private static integer a
endstruct
struct B
private static method test takes nothing returns nothing
set A.a = 1 // I want to make this legal
endmethod
endstruct
struct C
private static method test takes nothing returns nothing
set A.a = 1// illegal since only struct B can access struct A's private member
endmethod
endstruct
Is there a way to do this?