Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!rochester!cornell!vax5.cit.cornell.edu!a5uy From: a5uy@vax5.cit.cornell.edu Newsgroups: comp.sys.mac.programmer Subject: C++ for a beginner Message-ID: <1991Feb21.012535.2899@vax5.cit.cornell.edu> Date: 21 Feb 91 05:25:35 GMT Distribution: comp Organization: CIT, Cornell University Lines: 29 I've done a lot of programming on other platforms but never on the Mac. I need to put a fairly simple graphics application together in a hurry and find myself trying to learn C++ in the process so I can use the class library included with THINK C. Suggestions on good reference/tutorial books would be greatly appreciated! Here's a first obviously basic question...but a good answer would clear up all sorts of fog... All the sample progs have a main() that looks like this: void main(void) $ gApplication = new(CPedestalApp); ((CPedestalApp*)gApplication)->IPedestalApp(); gApplication->Run(); gApplication->Exit(); My question is why does gApplication need to be type cast as a (CPedestalApp*) in order to send the message IPedestalApp() when, as far as I can tell, it's type *IS* CPedestalApp* ??? And assuming this type cast is necessary, why is it *NOT* necessary in order to send messages Run() and Exit() ??? Thanks for any and all info!!! Since this is probably too basic for this group, feel free to answer via E-mail! Jan Speth The strong force is mediated by gluons, A5UY@VAX5.CIT.CORNELL.EDU not to be confused with cyano-acrylate ester, A5UY@CRNLVAX5 which is Krazy Glue.