Quote:
Originally posted by nixel
to my knowledge structures only group variables and not functions. what youre looking for are classes.
|
Actually, the way it's defined in that example, there is only a function pointer, which is perfectly OK to have inside a struct.
Yes, it is valid code (provided you include iostream, or something else that defines a 'string' data type).