struct keyword in C++


The struct keyword was introduced in 'C', its original functionality is documented here.

C++ has added two new features to structures.

  1. The syntax has been improved slightly so you no longer have to mess around with typedef statements.

    ANSI C approch to structures.

    
        typedef struct Person {int age; char *name} Person_t;   
    
        struct Person FirstMan;
        Person_t      SecondMan;
        

    C++ structures.

    
        struct Person {int age; char *name};   
    
        Person FirstMan;
        Person SecondMan;
        

  2. C++ also took the original idea of structures and added the ability to associate functions with the data within the structure. This feature was wrapped up with the introduction of the class keyword.


Examples:

Example program.


See Also:

o C++ Keywords
o C Keywords


Top Master Index C++ Keywords Functions


Martin Leslie 12 Nov 98

ct name='qt'>

path: root/.mailmap
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-03-10 17:42:47 +0530
committerMark Brown <broonie@kernel.org>2016-03-12 12:59:33 +0700
commita34785f10d33f70680941da284d7ec3a612aad1a (patch)
tree28c881c040d8101dac28b9591d1a38e75e8831d1 /.mailmap
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
regulator: of: Use of_property_read_u32() for reading min/max
OF interface provides to read the u32 value via standard interface of_property_read_u32(). Use this API to read "regulator-min-microvolts" and "regulator-max-microvolt". This will make consistent with other property value reads. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '.mailmap')