RE: [Dev-C++] compiling project fails
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2005-03-22 12:43:04
|
Exactly what difference is there between struct and class except for their
initial difference in protection?
A struct supports constructors, multiple inherritance, virtual methods,
operator overloading, ... etc just as a class. If you have found a
difference somewhere, please point me at that difference
(compiler and/or standard paragraph).
You can take any C++ application and replace
class xx : yy {
...
};
with:
struct xx : yy {
private:
...
};
directly, for identical functionality.
The only difference/limitation I can think about right now is that
template declarations only accept the "class" or "typename" keyword.
/Per W
On Mon, 21 Mar 2005 Mat...@Ve... wrote:
> One quibble about your characterization of structs as being classes with
> different protection: functions in structs definitely do not get called like
> functions in classes, nor do they behave the same way inside the compiler.
|