|
|
On Saturday, June 19, 2021 at 3:07:41 AM UTC+1 er...@seriss.com wrote:
Most of your example looks fine, but why are you using "struct"
instead of "class" in the above?
Use class so you can use all the normal keywords to control
method visibility such as
public: and protected: and private: and so it's clearly a class.
struct is effectively the same as class except that the default access is public rather than private. As the OP stated that's why he's using struct rather than class.
It's bad practice to have default access as public as that increases the risk of coding errors.
Phil.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/385f21de-0738-4ee7-ba8d-b1d811979b59n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |