This site is no longer active and is available for archival purposes only. Registration and login is disabled.

POO structures & sub classes


POO structures & sub classes

Postby Lewil » Sep 11, 2002 @ 3:52pm

User avatar
Lewil
pm Member
 
Posts: 108
Joined: Apr 25, 2002 @ 1:39pm


Postby Rhino123 » Sep 12, 2002 @ 10:49am

User avatar
Rhino123
pm Member
 
Posts: 66
Joined: Jul 2, 2002 @ 2:58pm
Location: Amsterdam


Postby Rhino123 » Sep 12, 2002 @ 1:29pm

User avatar
Rhino123
pm Member
 
Posts: 66
Joined: Jul 2, 2002 @ 2:58pm
Location: Amsterdam


Postby Lewil » Sep 13, 2002 @ 1:37pm

ok Rhino, that's what i'm trying, but i always have a :

error C2259: 'Surface' : cannot instantiate abstract class due to following members: ...\v0.99b - july 29th, 2002\overloaded\headers\surface.h(22) : see declaration of 'Surface'

on the line in header:

Surface m_mysurface;

?!?
User avatar
Lewil
pm Member
 
Posts: 108
Joined: Apr 25, 2002 @ 1:39pm


Postby BurningSheep » Sep 13, 2002 @ 2:16pm

That should be a pointer

Surface *m_mysurface;
Do you want custom Snails levels? Click
User avatar
BurningSheep
pm Insider
 
Posts: 1226
Joined: Apr 12, 2002 @ 11:49pm
Location: The Netherlands


Postby Lewil » Sep 13, 2002 @ 2:19pm

oh ! :')

thanks !!
User avatar
Lewil
pm Member
 
Posts: 108
Joined: Apr 25, 2002 @ 1:39pm


Postby Lewil » Sep 13, 2002 @ 2:32pm

ok seems to work

i just have a memory leak, i think, in the end (deallocation)
do i have to free that surface in the ~myclass ?

i tried
free( m_surface )
free( *m_surface )

(with scoped ptr it would be free ( m_surface.Get() ) ? )

... later ...
oh ! a:
m_surface->~Surface()
works
is it ok ?
User avatar
Lewil
pm Member
 
Posts: 108
Joined: Apr 25, 2002 @ 1:39pm


Postby Rhino123 » Sep 13, 2002 @ 4:14pm

User avatar
Rhino123
pm Member
 
Posts: 66
Joined: Jul 2, 2002 @ 2:58pm
Location: Amsterdam


another pitfall

Postby draklava » Sep 17, 2002 @ 11:55pm

User avatar
draklava
pm Member
 
Posts: 79
Joined: May 15, 2002 @ 6:13am
Location: Atlanta, Albania, Wherever


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron