Search unanswered questions...
Enter a question here...

What is the difference between a structure in C and a structure in C-plus-plus?

[Edit]

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.

<seshadri> 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 defination in the structure ). But in C++ you have that flexibility . </seshadri>

Improve Answer Discuss the question "What is the difference between a structure in C and a structure in C-plus-plus?" Watch Question

First answer by Beany828. Last edit by Seshu gemini. Contributor trust: 25 [recommend contributor]. Question popularity: 17 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > C Programming > What is the difference between a structure in C and a structure in C-plus-plus?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
What is structure in c?  What are enumeration constants?  Difference between structure in c c?  Difference between structure and array?  Difference between c structure c structure?  Difference between structure and enumeration?  Difference between C structure and C structure?  19 Difference between C structure and C structure?  What is difference beween c structure c structure?