answersLogoWhite

0

They are primarily included to retain compatibility with C. However, structures are public by default. So if you don't require the data hiding capability of a class, a struct is a suitable alternative. Also, when mixing C and C++ code, there may be a requirement to typecast a class to a struct and vice versa.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Advantages of manipulator in c plus plus?

theriyadhu


Basic control structure available in c plus plus?

The basic control structure in C++ is the if statement.


What is the name of the structure type in C plus plus?

The same as in C, struct.


Do I need structure of turbo c plus plus?

Yes.


What is the price of the book data structure using c and c plus plus by tanenbaum?

225 Rs. after discount........


Advantages and use of fumctions in c plus plus?

Functions allow to make your program modular meaning consisting of little blocks. It's easier to read and update program which has a modular structure, then just row code in one piece.


What are the Advantages of c over c plus plus?

There are no advantages of C over C++ as such. Everything you can do in C you can also do in C++. However, by taking advantage of C++ object oriented programming, generic programming and template meta programming as well as C-style coding, you can produce more efficient machine code far more easily and more quickly than with C alone.


Can you give an example of a structure in C plus plus?

struct point { int x; int y; };


What is the general structure of a C plus plus Language?

The central feature of any C++ program is classes which can be used to express ideas directly in code.


Basic structure of c n c plus plus?

The basic structure of a C or C++ program is built around types. A structure is a type. A function is a type. A class is a type. All of these types can be built from primitive (built-in) types and can be used to create ever-more complex types.


What the difference between c and c plus plus?

The fundamental difference is that in C++ object-oriented programming (OOP) was added. C is a procedural language (that means. top-down structure design), where as C++, which is an extension of C itself, is an object oriented language.


Advantages of C over C plus plus and java?

C can be faster than C++ programs, and definitely faster than Java, since Java is primarily interpreted. C is also somewhat less rigid in definitions as well, not as tightly structured as either C++ or Java can be.