[Dev-C++] What are the differences between a struct and a class?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Andre M. B. <and...@su...> - 2008-12-05 13:05:42
|
Dear users, When we need to develop a OO app, one way is to create classes, with attributes and methods. After this we instanciate the class in our program, as it is, or with some specialization. Thinking only about ANSI-C, we can create structs with the usual fields (attributes), but we can associate functions inside the struct too. After this operation, putting this struct definition in a .h file, we can make a variable declaration defining it as a struct type (the one created in the .h file). In this scenario, disconsidering the protected/public/private features, please talk to me abou what a OO app can do that a struct like .c program can´t. Regards Andre |