answersLogoWhite

0

Not much. C++ structures are the same, i.e., still declared with "struct".. Are you sure that you didn't mean to ask: "What's the difference between a structure and a class?" Cause, that's the main (DRUMROLL PLEASE) power of C++, among other things.

I think there is a difference in them. In struct of C there are no Member functions allowed .( you can use function pointer but not the definition in the structure ). But in C++ you have that flexibility .
A C++ struct is exactly the same as a C++ class, except that struct members are public by default while class members are private by default. Access to individual members can be overridden in the declaration thus either can be used for the same purpose. C++ programmers use classes to define most object types and reserve the struct type for backward-compatibility with C.

A C struct has member variables but has no methods. Accessibility cannot be defined, thus all members are effectively public at all times.

User Avatar

Wiki User

9y ago

What else can I help you with?

Related Questions

What can Cplusplus do vs HTML?

C++ can be used to make programs, HTML is for weblayouts and whatnot.


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.


What is the difference between C and advanced C?

The difference between C and the advanced C is that C is basic. On the other hand, the advanced C is thorough and to the detail.


What is the difference between the N-terminus and C-terminus in a protein structure?

The N-terminus is the starting point of a protein chain, while the C-terminus is the end point. They are important for determining the overall structure and function of the protein.


Difference between C and C programming language?

The C and C programming languages are one and the same. There is no difference between those languages.


Opening and closing a file in cplusplus?

You can use any usual C-functions like fopen/fclose or open/create/close.


What is the difference between c c?

ketchup!


What is the difference between 28C and 25C?

The difference between 28°C and 25°C is 3°C. This means that 28°C is 3 degrees warmer than 25°C.


What are difference between grade a b and c material?

The main difference is in between grade A,B & C IS THE CARBON CONTAIN OF THE MATERIALS.


What is the difference between 134 C and -170 C?

the answer is 304C


What is the difference between object and variable in c?

There is no objects in C.


What is the basic difference between C?

Nothing.