Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   c++ query (http://www.go4expert.com/forums/cpp-query-t2320/)

prem_may10 22Dec2006 13:07

c++ query
 
1.what is the differnce between class and structures ?

2. what is top to bottom approach,bottom to top approach


Thanks
Yasodhar premchand

shabbir 22Dec2006 14:23

Re: c++ query
 
what is the difference between class and structures ? (I assumed you meant by C++ structure and classes and not C struct and C++ class)

In Class by default the members/methods are private where as in struct its by default public.

2. what is top to bottom approach,bottom to top approach ?
It is used for parsing of code and it represent the direction in which the code is parsed.

Aztec 22Dec2006 15:57

Re: c++ query
 
The default inheritance is public for structures and private for classes.

shabbir 22Dec2006 17:00

Re: c++ query
 
Quote:

Originally Posted by Aztec
The default inheritance is public for structures and private for classes.

I knew I was missing the second point but could not recall on it.

Aztec 22Dec2006 18:30

Re: c++ query
 
Here's another one:

You can't use keyword struct in templates like template<struct T>

Some people do not consider this as a difference. But anyways I felt like mentioning it.


All times are GMT +5.5. The time now is 15:13.