Daniel, yes the restrictions are intentional. Structs are just the "data structure" aspect and don't admit things like inheritance either. Methods, enclosed types, etc. are restricted to classes. The data encapsulation aspects are similar but not the "behavior" and other aspects. Gord. danielm wrote: > Chapter *7.25 Classes and structures *enumerates differences between > classes and structures. > This chapter do not mention about allowed members of class vs struct. > Class item can be a method, typedef, other class. > > Struct members are restricted to be : > > { attribute_instance } [random_qualifier] data_type_or_void > list_of_variable_decl_assignments *;* > > This restriction was made on purpose? > > If so then it should be enumerate in *7.25 *becasue struct encapsulating > abilities are restricted in compare to class, while this chapter suggest > that common feature of class and strutc are encapsulation mechanism. > > > DANiel > > -- > This message has been scanned for viruses and > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is > believed to be clean. -- -------------------------------------------------------------------- Gordon Vreugdenhil 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.com -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Thu Mar 20 08:06:15 2008
This archive was generated by hypermail 2.1.8 : Thu Mar 20 2008 - 08:06:44 PDT