answersLogoWhite

0


Best Answer

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

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a structure in C and a structure in C-plus-plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.


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 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.


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.


What is the difference between c c?

ketchup!


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 object and variable in c?

There is no objects in C.


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

the answer is 304C


C plus plus program questions with answers?

I found cplusplus-answers.blogspot.com They have a lot of information on questions with answers and some without answers too but it is very helpful


Where could you learn the programming language Cplusplus on the internet for free?

There are a number of websites that can teach C++ programming for no cost. Please see the related links for some sites.


What is the difference between struct and union in c file management?

The main difference is in how the data structures are stored. In a union, all of the elements are stored in one location. A structure stores each of its elements in a separate memory location.