|
From: Daniel G. <sp...@ho...> - 2003-01-18 14:15:01
|
no it must be the same, because you are creating a new instance of a class. You'll get yClass1 undefined otherwise. >From: Zachary Uram <ne...@st...> >To: dev...@li... >Subject: Re: [Dev-C++] memory allocation >Date: Sat, 18 Jan 2003 06:20:41 -0500 > >Hi, > >In your example I think the name you give to new must be different than >class name. > >such as: > >class MyClass; >MyClass* Ptr = new MyClass1; > >Zach > >At 04:16 AM 1/18/03, you wrote: >>umm are we talking about the dynamic memory allocation using pointers and >>the new / delete operators? >> >>class MyClass; // forward declaration >> >>MyClass* Ptr = new MyClass; // Ptr points to an object of type MyClass, >>created dynamically. > >Zachary Uram >John 3:16 ><>< > > > >------------------------------------------------------- >This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will >allow you to extend the highest allowed 128 bit encryption to all your >clients even if they use browsers that are limited to 40 bit encryption. >Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ MSN 8: advanced junk mail protection and 2 months FREE*. http://join.msn.com/?page=features/junkmail |