Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Dialog boxes : why struc instead of class ?
Re: Dialog boxes : why struc instead of class ? [message #31630 is a reply to message #31624] Fri, 18 March 2011 13:29 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Jibe,

In C++, the only difference between struct and class are in default access right to the members. Class has private members as defualt, struct uses public, otherwise the behavior is the same. So using struct for dialogs in U++ is just laziness to write class XYZ{ public: ... } Wink You can of course use whatever form you like better, there is no functional difference.

The CLASSNAME could be equally well STRUCTNAME (or ASFDGFSDGSDFG or whatever else Very Happy ). I guess it kind of makes sense to call it CLASSNAME though, because class is well defined, while struct can be C struct or C++ struct and that could sound a bit ambiguous (not sure how much difference there is if any...).

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Linux (no variants of project types)
Next Topic: Dialog box with some internal actions
Goto Forum:
  


Current Time: Tue Apr 29 22:18:44 CEST 2025

Total time taken to generate the page: 0.00809 seconds