Hello. I'm a newbie and i was wondering if anyone can tell me how to create an array that contains objects and number 0 wherever there is no object. Thanks in advance
SpyrosMet
-3
Light Poster
Recommended Answers
Jump to PostI think you might be talking about an array of pointers to some objects, and the pointers are NULL if it does not contain valid pointer. Something like this:
class MyClass { // blabla }; // an array of 10 pointers to MyClass objects, // initialized to …
All 2 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
kvprajapati
1,826
Posting Genius
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.