answersLogoWhite

0


Best Answer

A struct (structure) is the same, whether you use C or C++, so, depending on your point of view, there is no difference.

In C++, however, a struct is a class that has no methods, not even a constructor or destructor (except for the default ones), and its default inheritance model is public instead of private.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

at the end there is pp are u sure with Ur answer? i think not i will not tell u that 2ry

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

In C++ structures can have member-functions, like this:

struct {

int data;

int fun (void);

} mystr;

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between structures in C and structures in CPP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How does a compiler interpret the difference between c and c plus plus?

from the extension of your file.If it has an extension of .cpp then it is a c++ programIf it's extension is .c, then it is a C program.


Major difference between java and cpp?

CPP typically stands for the C PreProcessor, which does macro expansion on C source code. What I suspect you want to know are the differences between C++ and Java. See the links below for more information on that topic.


Main deffrent between c and cpp?

C is a procedural programming language, while C++ is a multi-paradigm programming language that supports both procedural and object-oriented programming. C++ has additional features such as classes, inheritance, and polymorphism that allow for more flexible and modular code design compared to C.


What is extension in c programming?

for c language it is .c and for c++ it is .cpp


How the c and cpp extension files can be retrived using FIND command in Linux?

find . -iname '*.c' -o -iname '*.cpp'


Why the extension cpp of c?

The extension of a file containing a C program can be any extension, so long as the compiler or platform can infer the proper rules to build it. Commonly, for C programs, the extension is .c, so myfile.c would be a C program. The term cpp is not a designation for C++. It means C Program Precompiler, and it is the normal way to build one or more C programs into an executable. Over the years, cpp has evolved into being able to handle all sorts of languages. C++ is one of them. Typical extensions for C++ programs are .cc, .cpp, and .cxx.


How do you Open a text file as C plus plus source code?

All C++ source code is is a text file with the .cpp extension. So if you save your code as *****.cpp then it is automatically C++ source code.


What c plus plus program must be saved in a text with the extension cpp?

The .cpp extension is merely conventional; it is not required by the C++ standard. You can actually use any file extension you wish.


Difference between C main and CPP main?

There is no difference between the C main function and the C++ main function.They are both defined as int main (int argc, char *argv[]) {statements}.There have been different syntaxes over the years, but the end result is the same. There are also some variations, such as adding a char *envp[] argument to pass the environment, but that is not standard usage. It is also possible to have no arguments, as in int main() {statements}.


Will particular C program be compatible for both g c c and DEV Cpp compiler?

That is possible. Try it.


Why is cpp or c platform dependent?

Different architecture on different platforms.


What year was Cpp released to the public?

C++ first appeared in 1983.