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

Recommended Answers

Did you try it? If not, why not?

Jump to Post

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.