|
-
April 10th, 2018, 08:00 AM
#1
c++ global access related
Hi All,
In a class , I have Init() method, which gets called if that feature is enabled.
But somehow, i want to make sure that other methods are called, only if Init() is called earlier.
Right now, eventhough Init() is not called, other methods are called and resulting in bad behaviour.
What is best way to implement this ? May be add a static flag in the class and check it at each method call.
Could c++ experts let me know the better way to implement this ?
thanks
pdk
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|