Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 8 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Soldier of Fortune
Category: SoFII General
General game questions, comments and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Ok question about java...
MoNoXBooGie~rb
General Member
Since: Dec 23, 2006
Posts: 3176
Last: Dec 23, 2006
[view latest posts]
Level 9
Category: SoFII General
Posted: Thursday, Aug. 14, 2003 10:59 pm
Quote (Fuz@2die4.com @ Aug. 14 2003, 3:21 am)
Quote
I just thought about something.... maybe it's a bad idea to use recursive constructors because the object you're passing on hasn't been created yet?


No.  When you are in the constructor, self exists. The object has been allocated and can be referenced.

The main problem about recursion in the Constructor, is the Polymorphism problem.  Lets say you make a descendant class that has additional attributes... you can't call the inherited constructor because that creates nodes of its class and not of your class - unless you can pass the class type as parameter.  So, it gets messy.  If you use a virtual function to instantiate each node, you get around that problem.

Alright I see the problem. I guess when doing it right you'll just have to re-write and over-write the function in every sub class of the super class?
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Soldier of Fortune : SoFII General

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»