Link to home
Start Free TrialLog in
Avatar of rickhill11
rickhill11

asked on

add elements to existing standard structure

This comes under the heading of "I'd like to know."

Suppose that I have a function that uses struct tm, but I want to add add some additional elements to that structure.

I know for instance that I can do something like
struct foo{
    struct tm mytime;
    int xx
}

I know that I can address elements of tm within foo by for instance, foo.mytime.tm.year, but is there a way to create a structure foo that inherits the elements of tm?  I've never seen it done, so if it is possible, is it reasonable.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rickhill11
rickhill11

ASKER

Thanks