That's what error messages are for. Now that you've asked, what are the errors (if any)?
olifant wrote:
Ob object2() (sic)
Hanst has already pointed this out, but I'll go a little deep. This declaration is a function prototype declaration. This is fine. However, a function prototype declaration within another function isn't allowed. My guess is that this declaration wasn't intended to be a function prototype, but an instantiation of Ob that calls the default constructor. If this is the case, follow Hanst's advice.