struct keyword

   
struct keyword Declares class with public members

  class-key  := struct 

The struct keyword declares a class that has public access by default. Inheritance is also public by default. See class for syntax rules.

Example

  struct  point {   int x, y; };  struct  point p1; // "struct" is redundant here. point p2; 

See Also

class , union , Chapter 6

   


C++ in a Nutshell
C++ in a Nutshell
ISBN: 059600298X
EAN: 2147483647
Year: 2005
Pages: 270
Authors: Ray Lischner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net