Not really. What would help is paring down your code to the absolute minimum without eliminating the error and posting it here so we can see what's going down. Typically that error occurs when you have a syntax error somewhere above the line that's reporting it.
using namespace std;
int hr, min, sec;
clock myclock; //object declaration
cout<<"Program with a class Clock"<<endl;
cout<<"Values before assignment"<<endl;
cout<<"now enter values for hour, Minute and Second respectively"<<endl;
myclock.set_time(hr, min, sec);
Coolio. Actually, clock is a horrid name because it's also the name of a function in the C library. Your implementation could very easily expose that even if you don't include ctime, so I'd strongly recommend using either a different name or dropping the class in a namespace.
That's most likely your issue. The compiler sees clock as a function rather than a type, so the declaration is malformed.
Oh my goodness! I do not know how to thank you. That worked!
I changed "clock" to "clocks" to minimize changes to just one letter.
By the way, in the future, I am to use a namespace instead, how do I do it?