![]() |
What is the difference between a structure in C and a structure in C-plus-plus?In: C Programming |
[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>
First answer by Beany828. Last edit by Seshu gemini. Contributor trust: 25 [recommend contributor]. Question popularity: 17 [recommend question]





