User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 396,894 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,064 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:

Help : Pointers to array of class objects .

Join Date: May 2005
Posts: 21
Reputation: gpta_varun is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
gpta_varun gpta_varun is offline Offline
Newbie Poster

Re: Help : Pointers to array of class objects .

  #3  
Jun 8th, 2005
Thnx a lot Sir !!!



That definately worked ......But just wanna know thw diff b/n

Approach 1
---------------

Rectangle * ptr_arr;
ptr_arr=new Rectangle[2];


Approach 2
---------------

Rectangle * ptr_arr[2];
ptr_arr[0]=new Rectangle;
ptr_arr[1]=new Rectangle;


Are the two approaches same ???
Reply With Quote  
All times are GMT -4. The time now is 4:19 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC