answersLogoWhite

0

Structure members are public by default while class members are private by default. Classes encapsulate the data and the methods that operate upon that data into a discrete package (an object), exposing only as much or as little interface as is required by the class itself, to ensure the data remains in a valid state at all times. Structures have no such protection.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is difference between struct variable and class object?

structure variable can access the variable but class object can access the function also


What is the difference between allocation and search data structure?

difference between serch data structure and allocation data structure


Difference between tall and flat organization structure?

There does not have to be a difference between a tall organization structure and a flat organization structure. These structures can be the same structure.


Difference between a class and a struct?

By default, all of the members of a class are private and, by default, all of the members of a structure are public.Structure are value type where as class are reference type.'this' pointer will work only in class.Inheritance between classes is also private by default, and inheritance between structs is public by default.Classes support polymorphism, whereas structure do not.


What's the difference between the Class 365 and Class 465 466?

The difference between the Class 365 and Class 465, 466 is basically the cost.


Difference between exclusive or inclusive class intervals?

difference between inclusive and exclusive class interval


Difference between formal and informal organisation?

difference between formal organization structure and informal organization structure.


What is difference between first class and second class on train trips?

What is the difference between buying a 1st class and a 2nd class ticket on the train in England?


What is the difference between a matrix structure and a organisational structure?

the difference between an organisational structure and a matrix structure is that a matrix structure is a combined structure whereas an organisational structure is in a vertical order and has different levels.


What is the price difference between first class and economy class tickets for this flight?

The price difference between first class and economy class tickets for this flight is 500.


What is the difference between a building and a structure?

All buildings are structures but not all structures are buildings


What is the difference between a class What is the difference between a class III and class IV hitch and?

class III rated for up to 5,000lbs, class IV is rated for up to 10,000lbs towing capacity