Default Constructor issue

I have to make a time class where the default constructor is the time(0) function.
My code for the default constructor is:

Time::Time()
{
time = time(0);
}

but when I try to run it I get this error: error C2064: term does not evaluate to a function taking 1 arguments.

Can the default constructor only take numbers and not functions or is there a way to make this work?
The compiler thinks "time" is a variable in your class. You need to specify which "time" you mean:
1
2
3
4
Time::Time()
{
time = std::time(0);
}

Hope this helps.
It did. Thanks!!!!
Topic archived. No new replies allowed.