Page 1 of 1

First attempt at OOP structure

Posted: Sun Jun 22, 2008 10:09 pm
by chaotischerapostel
This was my first attempt at OOP programing, I'm not really asking for help as im going to try again with a different approch. But I just put it up because for some reason its making two windows.

http://rafb.net/p/36CkIH17.html

Theres the code. Its seperated into a bunch of files and its about 300 lines. I put /////// between different files and then //filename befor each section of code to help seperate it. The EventReceiver is in CGstate because i couldent even get my program to compile with it in its own header. The EventReceiver is the problem, i comented it out and the rest of the program worked fine and only made one window. The Global.h doesnt have anything but the includes on purpose, I don't accully have any Globals but it helped me structure things.

Posted: Mon Jun 23, 2008 12:08 am
by JerryM
Two windows are being made because you have a CGcore object in two classes. Both your CGstate and CGreceiver classes construct a CGcore object.