Can we declare objects of type Person, when Person is a class?

Recommended Answers

All 2 Replies

Did you try it? If not, why not?

Yes you can. following is the syntax of creating object of person class
person p1,p2,p3.... and so on.
and also you can create arrays of object by:
person p1[],p2[],p3;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.