>>I agree with your definition with the exception that in C++, a structure can have member functions (aka methods).
>
>Umm, no. A structure can contain a pointer to a function, but a structure will not directly contain methods. As the gentleman from Georgia has pointed out, structures are contiguous blocks of memory, and it's kind of hard to squeeze a function into something that is a predefined block.
C++ structure definitions can contain functions. Of course the functions are not actually in the block of data, they do exist in the declaration and are available to any C++ code that uses the declaration.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only