IonicWind Software

Aurora Compiler => GUI => Topic started by: GWS on December 14, 2005, 08:25:54 AM

Title: Understanding OOP
Post by: GWS on December 14, 2005, 08:25:54 AM
Hi,

Here's a small squeek from an Basic mouse, lost in this brave new OOP-land maze that everyone is rushing into.ÂÃ,  I realise that just reading this is holding up those already knowledgeable from pressing on with their investigations, but I imagine I'm not the only one struggling to see the light.

I have 8 thick volumes on my bookshelves relating to Windows programming, 'C', 'C++', Delphi (which is OOP based), and RealBasic (ditto).ÂÃ,  I 'm trying to read what everyone is posting and to enhance my understanding by reading related stuff in the books.ÂÃ,  It isn't working so far!

I've looked at OOP on and off (more off) over the years, feeling on the one hand that it embodied something important (read making programs easier to develop), and on the other hand, that it could be an April fool joke gone badly wrong.ÂÃ,  Something some clever university guy came up with to build a career and write many profitable books about.

The thing is, I can quite easily make Windows/Dialogs happen with all necessary controls to build applications in Basic. Just define a 'Window' type, use 'OPENWINDOW winname', and declare the window's message handling routine.

All I want as an applications man is to have a canvas on which my program can write.ÂÃ,  I don't really care how it does it.

I know Paul waves a very effective magic wand to make that happen, and in Aurora, he's still doing a lot behind the scenes.ÂÃ,  (One of my thick books has 5 pages of 'C' hieroglyphics to make a window happen).

Bear in mind that what follows is written by someone who has very little clue what's going onÂÃ,  ::)-

I know a Window can be considered, as can each control, as an object (class).ÂÃ,  So in the Window example, I'm happy with -

class mywindow : window

as defining 'mywindow' as a window, and for 'mywindow' to be created in the main() routine.

But then I look for a message handling routine - and can't see one.

Instead, and even before we get a window onscreen, we list several 'override' functions.
Overriding what?ÂÃ,  Wasn't the window we were creating up to the job in some way?

Looking through gui.inc we find windows have lots of functions associated with them - many of which are 'virtual' ??ÂÃ,  I don't yet know what this 'smoke and mirrors' stuff means.ÂÃ,  The use of OOP language makes it more obscure.ÂÃ,  I've read Parker and Paul's notes and I'm still struggling to understand why we are going through such contortions just to execute these functions.ÂÃ,  I shall just have to keep reading til the penny drops.

Anyway, the window example has onclose, oncreate, and ontimer routines declared in the form:

mywindow :: Onthisorthat() ,int

I can see what these are doing - pretty well what would have been placed in the window's message-handling routine in Basic.ÂÃ,  Maybe these are simply doing the message handling that Basic would have done, but are written in a different place in the program - placed prior to, rather than within, the main() routine.ÂÃ,  Would I be right in guessing that any subroutines in one of my applications would be written after the main() routine?

Presumably, when we get an example with some controls, we will see little routines like these dealing with say button clicks - although how you will tell 'which' button was clicked I don't yet see.ÂÃ,  Have to wait for an example.

In the main() routine we set all the parameters for the window, which looks neat.ÂÃ,  Why the main() routine has to be declared Global I don't know, 'cos I'd have thought it was Global by definition.

To close the window, we use a window variable 'm_hWnd' which gets set to 0 when the window is closed.ÂÃ,  This is OK, but what was wrong with 'run = 0' as used in Basic.ÂÃ,  Is this just a 'better way'.

I'll stop squeeking for a bit .. :)

Graham

Title: Re: Understanding OOP
Post by: Ionic Wind Support Team on December 14, 2005, 09:16:30 AM
Hi Graham,
OOP does have a steep learning curve for those that have only used procedural languages in the past.  Each method has its advantages and disadvantages.

Stick around, I will have more examples as we progress, and try and answer your quetions as best I can.  The best book I have ever seen that taught OOP concepts was "Teach yourself C++".  Don't know if it is still in print or not.

Some find it easier to think of classes as mini-programs.  Class variables are like global variables, they are accessable to every method of that class. Methods are subroutines, no matter how you look at them.  If you look at the 'lines.src' program there are 5 class variables I use just like the global counterparts in the IBasic example.  Including waiting for "run" to equal zero.

Quote
Presumably, when we get an example with some controls, we will see little routines like these dealing with say button clicks - although how you will tell 'which' button was clicked I don't yet see.  Have to wait for an example.

If each button on a form has its own name, a variable, derived from a 'button' class, then you could handle button clicks in two ways.

#1.  In the parent window override OnControl.


mywindow::OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
{
       select(nID); //same as @CONTROLID
       {
             case 4:
                   if nNotifyCode = 0
                       //button clicked
             ....
       }
       return true;
}


Which is the most common way to do it.

#2.  If I were to provide an 'OnClicked' handler in the base 'button' class you could have a subroutine (method) for each button on your form. 


button1::OnClicked()
{
}

QuitButton::OnClicked()
{
}

SaveButton::OnClicked()
{
}


Quote
Would I be right in guessing that any subroutines in one of my applications would be written after the main() routine?

You can put your subroutines anywhere.  I place 'main' last in my examples so I can concentrate on the 'meat'.

Quote
But then I look for a message handling routine - and can't see one.

Every window has a handler.  In the window class it is called WndProc which gets run everytime a message is received by that particular window.  In turn WndProc calls a subroutine associated with that message.  Such as OnClose()

In the base window class OnClose looks like this:

window::OnClose(),int {return 0;}

Which does absolutely nothing but return 0 to Windows.  When you override OnClose in your derived class


class MyWindow : window // <- MyWindow is derived from window.
{
declare OnClose(),int;  // <- you are overriding the OnClose function with your own.
int run;
}

MyWindow::OnClose(),int
{
    run = 0;
    Destroy();
}


So when WndProc calls OnClose it executes the code in your class, instead of in the base window class.  Your not replacing the OnClose function for all windows, everywhere.  Just in any class of type 'MyWindow'.

Maybe not the best description.  Hope it helps though

Paul.

Title: Re: Understanding OOP
Post by: GWS on December 14, 2005, 12:02:53 PM
Thanks Paul, that's very helpful ..ÂÃ,  :)ÂÃ,  I'm sure I'll catch on in the end ..

Got to go see my little granddaughter in her school Christmas show now.ÂÃ,  The kids have worked so hard for weeks practicing for it ..

best wishes, :)

Graham
Title: Re: Understanding OOP
Post by: donh on December 14, 2005, 02:07:54 PM
Thanks for the explination Paul  ;D ;D ;D
Graham thanks for asking these questions this has been my stubling block also.

Paul
as a sugestion with all these goodies that you are explaining about OOP.
how about another topic in the fourms about OOP so they can all be grouped
together and as other people chime in they can add to it and it could be a start to an
introductry for the Docs when you get around to it.

Don H
Title: Re: Understanding OOP
Post by: mrainey on December 14, 2005, 03:27:31 PM
QuoteThe best book I have ever seen that taught OOP concepts was "Teach yourself C++"


Is that the one by Herbert Schildt?  If so, I think I have it tucked away somewhere.  Will drag it out for a look.

Title: Re: Understanding OOP
Post by: Doc on December 14, 2005, 03:46:37 PM
Quote from: mrainey on December 14, 2005, 03:27:31 PM
QuoteThe best book I have ever seen that taught OOP concepts was "Teach yourself C++"


Is that the one by Herbert Schildt?  If so, I think I have it tucked away somewhere.  Will drag it out for a look.



Hey Mike,
Herb Schildt wrote one called "Teach Yourself C", published by McGraw-Hill and a fellow by the name of Al Stevens wrote "Teach Yourself C++", which was published by Wiley's.

Got 'em both (in addition to some others) on the bookshelf. :)

-Doc-
Title: Re: Understanding OOP
Post by: mrainey on December 14, 2005, 07:37:30 PM
Doc,

The mystery deepens.  I just dug out the book I was thinking of and it's "Teach Yourself C++", by Herbert Schildt.  Two books with the same title?  Whatever.

I got enough from Schildt's book on C a long time ago to do some decent work, so maybe this one will help me with basic OOP understanding.  And maybe not.   :)
Title: Re: Understanding OOP
Post by: Doc on December 14, 2005, 07:44:41 PM
Heh heh... well on closer inspection, I think I can see the difference.

..they've named it "Wiley's Teach Yourself C++"  :o :D ;D

Who would have ever thunk it.  :-\

-Doc-
Title: Re: Understanding OOP
Post by: seberbach on December 14, 2005, 08:31:19 PM
Gee, I thought you meant "Teach Yourself C++" (in 21 days) by Jesse Liberty, published by Sams, Second Edition!!
(see http://www.libertyassociates.com  )

LibertyAssociates have other versions, too, like "Teach Yourself C++ in 10 Minutes", 2nd ed. etc. etc.

I got mine for $1.00 from local bookstore on street sale because it was out of date.  Now they are up to 5th edition, and have one for Linux, too.

Steve
Title: Re: Understanding OOP
Post by: mrainey on December 14, 2005, 08:43:11 PM
Quote"Teach Yourself C++ in 10 Minutes"


Hell, if it's that easy I'm already a convert.   ;D
Title: Re: Understanding OOP
Post by: Ionic Wind Support Team on December 14, 2005, 09:13:20 PM
I believe the 21 day one was the one I first looked at.

Paul.
Title: Re: Understanding OOP
Post by: Bruce Peaslee on December 14, 2005, 10:31:21 PM
I bought "Sams Teach Yourself C++ in 10 Minutes". (No joke. ISBN 0-672-32425-3)

So by tomorrow (or even bedtime) I should be able to answer any questionsÂÃ,  8)
Title: Re: Understanding OOP
Post by: GWS on December 15, 2005, 01:52:21 AM
You guys are really funny ..ÂÃ,  :)

It takes me 10 minutes to read the cover notes ..ÂÃ,  ::)

Graham
Title: Re: Understanding OOP
Post by: Zen on December 15, 2005, 05:02:51 AM
A few years back when i first started out with PHP i bought a book called "PHP in easy step" it was really good for getting started with as it had very good explanations about things like variables, functions, arrays etc.

When i went to college i needed to get quite a lot more books, so i went to my local bookshop and found the "In easy steps" series again. I now have one for C, C++, Java and PHP. So for ÂÃ,£10 if anyone wants to know a little bit without throwing themselves in too far these come highly recomended.

I would aslo recomend the O'Reiley cookbooks. They are filled with pages of problems, solutions and a discussion on many different topics, unfortunatley these retail at about ÂÃ,£30 - 40.

Lewis
Title: Re: Understanding OOP
Post by: Parker on December 15, 2005, 08:24:59 AM
I've got the one by Jesse Liberty, it really helped me understand this stuff.
Title: Re: Understanding OOP
Post by: Dennisc on December 15, 2005, 10:48:04 AM
QuoteIt takes me 10 minutes to read the cover notes .. 

It takes me 10 minutes to find my reading glasses :) :)

Dennis
Title: Re: Understanding OOP
Post by: GWS on December 17, 2005, 09:32:31 AM
Hooray! .. my 'Teach Youself C++ in 21 days'  has arrived from Amazon .. :)

So in three weeks I shall know everythingÂÃ,  ::) .. some chance .. more like 21 months I'd say .. :)

best wishes,

Graham
Title: Re: Understanding OOP
Post by: Zen on December 17, 2005, 09:39:28 AM
I was reading through my C++ book last night, I think it just made things worse. I thought i had an understanding about Virtual methods and normal methods, but not now.

Lewis
Title: Re: Understanding OOP
Post by: Ionic Wind Support Team on December 17, 2005, 09:48:36 AM
Keep in mind that Aurora isn't C++.  But all of the theory does apply to classes and methods.

Aurora is more forgiving ;)
Title: Re: Understanding OOP
Post by: Zen on December 17, 2005, 09:55:57 AM
The only reason i read it is because of the theory behind it and because a lot of syntax is the same.

Lewis
Title: Re: Understanding OOP
Post by: Parker on December 17, 2005, 02:02:13 PM
I think you've just gotta keep at it. And looking through the assembly code and experimenting never hurts. Paul is great at explaining these things too.
Title: Re: Understanding OOP
Post by: GWS on December 19, 2005, 03:45:21 AM
I got started with the usual example in VC++5:

#include <iostream>

int main()
{
std::cout << "Hello from me!\n";
return 0;
}



and got -

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

I can't see what's wrong with it, and I can't try it in Aurora 'cos we don't have iostream (or at least I haven't spotted it.

Any ideas ..:)

Graham
Title: Re: Understanding OOP
Post by: Zen on December 19, 2005, 07:09:24 AM
Graham. The way i understand C++ to work is it has librarys just like aurora does, however aurora's core librarys are included auromaticly if one of the functions within it is used. Its Pauls clever little linker that does that.

IOSTREAM is a C++ library for sending output to the screen and getting input from the user.

your code would convert to this in aurora...


global sub main() {

    writeln("Hello from me!\n");

    return;
}


The only difference is that the Aurora code is not OOP, but just standard procedure. I think (just a guess) that the C++ code is calling a method from the standard class called cout which is basicly writeln in aurora.

Take a look at the include file in aurora's bin directory, those are the different library's and in them are the function definitions.

Hope this helps.
Lewis
Title: Re: Understanding OOP
Post by: GWS on December 19, 2005, 08:30:41 AM
Thanks Lewis ..ÂÃ,  :)

Fussy stuf this C++.ÂÃ,  I got it going after lunch as:


#include <iostream>

void main()
{
std::cout << "Hello from me!\n";
return;
}


Maybe VC++5 isn't to current ANSI standards ..ÂÃ,  ::)

Looking forward to Paul's further revelations for Aurora.ÂÃ,  It may well finish up more useable than VC++ ..ÂÃ,  :)

Graham
Title: Re: Understanding OOP
Post by: Parker on December 19, 2005, 10:08:39 AM
Well that's odd, it should compile fine. It looks like the compiler isn't making _main a global function. Don't know if it'll help, but try this:
#include <iostream>

extern "C" int main()
{
std::cout << "Hello from me!\n";
return 0;
}

which should help if you're exporting a mangled function and it's looking for _main, but other than that I don't know. You may want to try a newer compiler, VC5 is a little old. Microsoft doesn't even support VC6 anymore from what I've heard. You could buy one of MS's, but they're expensive. Maybe Dev-C++ or Code::Blocks IDEs would be a better choice, which come with a free compiler.

I don't doubt that Aurora is going to be easier to use, C++ isn't designed for that. But C++ has a lot of features that most other languages don't. And it's the most popular language. So if you do take the time to learn it, you'll learn a lot about programming in general.
Title: Re: Understanding OOP
Post by: GWS on December 19, 2005, 12:13:22 PM
Thanks Parker ..ÂÃ,  :) .. that worked OK.ÂÃ,  I guess your 'extern' statement tells it to treat the code as justÂÃ,  'C' rather than 'C++'.ÂÃ,  Trouble is, you can't concentrate on your application if you've got to keep spoonfeeding Microsoft's compiler to get it to accept code.

It's only the first example in the Jesse Liberty bookÂÃ,  ::) - I didn't get very far did I?ÂÃ,  :)

The book gives the example for VC++6 with all the steps for a Win32 console program - so silly me was expecting it to work straight off ..

Never mind .. I'm really only reading for the basic principles of C++ so that I can try things in Aurora.

The stuff you experts are posting doesn't mean much to me yetÂÃ,  :)

all the best, :)

Graham
Title: Re: Understanding OOP
Post by: Bruce Peaslee on December 19, 2005, 12:26:19 PM
Graham,

I feel the same way, but I put my "C++ in 10 minutes" away. I wasn't getting anywhere. The Aurora learning curve seems about standard, with the added difficulty of it not being finishedÂÃ,  :DÂÃ,  I still have problems with variable scope and how things are named in OOP, but with a lot of help from folks I have made some progress. This program does some stuff with menu items, centers text and controls, and responses to button clicks.


// *****************************************************************************
// * Aurora2.src by Bruce Peaslee                                           *
// * A test program for Aurora - compile as a windows exe.                  *
// *****************************************************************************

#AutoDefine "Off"

#typedef bool int;

// *****************************************************************************
// *                              GLOBAL CONSTANTS                             *
// *****************************************************************************

// Menu Constants (for program control)
const FILE_OPEN       =  1;
const FILE_CLOSE      =  2;
const FILE_EXIT       =  3;
const EDIT_CUT        =  4;
const EDIT_COPY       =  5;
const EDIT_PASTE      =  6;
const OPTIONS_OPTION1 =  7;
const OPTIONS_OPTION2 =  8;
const HELP_ABOUT      =  9;
const HELP_HELP       = 10;

// Menu Style Constants
const MF_ENABLED   = 0;
const MF_GRAYED    = 1;
const MF_DISABLED  = 2;
const MF_UNCHECKED = 0;
const MF_CHECKED   = 8;

// Window Style Constants
const WS_CHILD   = 0x40000000;
const WS_VISIBLE = 0x10000000;

// Misc Constants
const GWL_HINSTANCE    = -6;
const BS_DEFPUSHBUTTON =  1;
const WM_COMMAND       = 273;

// *****************************************************************************
// *                              API DECLARATIONS                             *
// *****************************************************************************

declare import, GetSysColor(index as int),int;
declare import, CreateWindowExA(
dwExStyle as unsigned INT,
lpClassName  as string,
    lpWindowName as string,
    int dwStyle,
    int x,
int y,
    int nWidth,
    int nHeight,
    int hWndParent,
    hMenu as unsigned int,
    hInstance as unsigned int,
    lpParam as pointer
),int;
declare import, GetModuleHandleA(int num),unsigned int;
declare import, SetWindowPos(
unsigned int hwnd,
unsigned int hwndinsertafter,
int x,
int y,
int cx,
int cy,
unsigned int uFlags
),INT;

// *****************************************************************************
// *                             OVERRIDDEN METHODS                            *
// *****************************************************************************

class myWindow : cwindow
{
// Overridden functions
declare OnClose(),  int;
declare OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
declare OnCreate(), int;
declare OnMenuPick(int nID), int;
declare OnSize(int nType, int cx, int cy), int;

// Variables
def m_run as int;
def m_hMainButton1 as int;
def m_hMainButton2 as int;
def m_bOption1 as bool;
def m_bOption2 as bool;
}

myWindow::OnClose(), int
{
m_run = 0;
return True;
}

mywindow::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
select(nID) //same as @CONTROLID
{
case 1:
if nNotifyCode = 0 //button clicked
MessageBox(this,"One!","Clicked",0);
case 2:
if nNotifyCode = 0
MessageBox(this,"Two!","Clicked",0);
default:
}
return true;
}

myWindow::OnCreate(), int
{
m_run = 1;
m_bOption1 = false;
m_bOption2 = false;
CenterWindow();
return true;
}

myWindow::OnMenuInit(), int
{
return true;
}

myWindow::OnMenuPick(int nID), int
{
menu m;
select (nID)
{
case  FILE_OPEN:
case& FILE_CLOSE:
MessageBox(this,"Not implemented","Notice",0);
case  FILE_EXIT:
m_run = 0;
// both Option1 & Option2 can be true
case  OPTIONS_OPTION1:
m.Attach(GetMenu());
if m_bOption1 = false
{
m.CheckMenuItem(OPTIONS_OPTION1, true);
m_bOption1 = true;
}
else
{
m.CheckMenuItem(OPTIONS_OPTION1, false);
m_bOption1 = false;
}
m.Detach();
case  OPTIONS_OPTION2:
m.Attach(GetMenu());
if m_bOption2 = false
{
m.CheckMenuItem(OPTIONS_OPTION2, true);
m_bOption2 = true;
}
else
{
m.CheckMenuItem(OPTIONS_OPTION2, false);
m_bOption2 = false;
}
m.Detach();
case  HELP_ABOUT:
MessageBox(this,
"Aurora2\n"          +
"(c) 2005 Speedy G\n\n" +
"All Rights Reserved",
"About...", 0);
default:
}
return True;
}

myWindow::OnSize(int nType, int cx, int cy), int
{
def clientRect as rect;
def textSize as point;
def x,y as int;

// move heading text
SetWindowColor(GetSysColor(15)); // also clears screen
SetFont("Comic Sans MS",14,800);
FrontPen(RGB(129,37,0));
BackPen(GetSysColor(15));
textSize = GetTextSize("Skeleton");
clientRect = GetClientRect();
x = (clientRect.right - clientRect.left - textSize.x)/2; // to center text
y = 10;
WriteText(x,y,"Skeleton");

// move buttons. assume they remain 64 pixels apart
x = (clientRect.right - clientRect.left - 204)/2;
y = clientRect.bottom - 55;
SetWindowPos(m_hMainButton1,0,x,y,70,20,0);
x = x + 70 + 64; // offset for Button2
SetWindowPos(m_hMainButton2,0,x,y,70,20,0);

Return 0;
}

// *****************************************************************************
// *                              MAIN SUBROUTINE                              *
// *****************************************************************************

global sub main()
{
def winMain         as myWindow;
def x,y             as int;
def hinst           as unsigned int;

menu m; // Unused or unready menu items are grayed
m.BeginMenu();
m.MenuTitle("&File");
m.MenuItem("&Open",         MF_GRAYED, FILE_OPEN);
m.MenuItem("&Close",        MF_GRAYED,  FILE_CLOSE);
m.Separator();
m.MenuItem("E&xit",         MF_ENABLED, FILE_EXIT);
m.MenuTitle("&Edit");
m.MenuItem("Cut\tCtrl+X",   MF_GRAYED,  EDIT_CUT);
m.MenuItem("Copy\tCtrl+C",  MF_GRAYED,  EDIT_COPY);
m.MenuItem("Paste\tCtrl+V", MF_GRAYED,  EDIT_PASTE);
m.MenuTitle("&Options");
m.MenuItem("Option 1",      MF_ENABLED, OPTIONS_OPTION1);
m.MenuItem("Option 2",      MF_ENABLED, OPTIONS_OPTION2);
m.MenuTitle("&Help");
m.MenuItem("&About...",     MF_ENABLED, HELP_ABOUT);
m.MenuItem("&Help",         MF_GRAYED,  HELP_HELP);
m.EndMenu();

winMain.Create(0,0,300,240,
AWS_CAPTION|AWS_VISIBLE|AWS_BORDER|AWS_SYSMENU|AWS_AUTODRAW|AWS_SIZE|
AWS_MAXIMIZEBOX|AWS_MINIMIZEBOX,
0,"Skeleton",NULL);
winMain.SetMenu(m.Detach());

hinst = GetModuleHandleA(null);

winMain.m_hMainButton1 = CreateWindowExA
(0,"Button", "One",
WS_VISIBLE | WS_CHILD,
48,139,
70,20,
winMain.m_hwnd,
1, // control number
hInst,
NULL);

winMain.m_hMainButton2 = CreateWindowExA
(0,"Button", "Two",
WS_VISIBLE | WS_CHILD,
182,139,
70,20,
winMain.m_hwnd,
2, // control number
hInst,
NULL);

// message loop
do
{
wait();
}until winMain.m_run = 0;
return;
}



Title: Re: Understanding OOP
Post by: Parker on December 19, 2005, 01:02:26 PM
I wonder if the code copying could be fixed. It pastes with no indents, and I get an error from the assembler: Symbol `default' redefined. I guess Aurora is treating default: as a label when there are no indents ???

Graham, when C++ came out with its function overloading, programmers needed a way to call functions written in plain C. So they came up with the extern "C" declaration which means to remove all name mangling from the declarations, although you can't get rid of the prefixing underscore. The declaration int main() may translate to something like this in assembly code: _$qmain@#v: while extern "C" int main() will translate to simply _main:
The convention is this:
#ifdef __cplusplus
extern "C" {
#endif
...
#ifdef __cplusplus
}
#endif
since plain C compilers don't recognize the extern "C" declaration. But it shouldn't be needed for main(), I guess VC5 wasn't made to standards. But other versions of MS compilers handle it correctly.
Title: Re: Understanding OOP
Post by: Bruce Peaslee on December 19, 2005, 01:09:21 PM
Quote from: Parker on December 19, 2005, 01:02:26 PM
I wonder if the code copying could be fixed. It pastes with no indents, and I get an error from the assembler: Symbol `default' redefined. I guess Aurora is treating default: as a label when there are no indents ???

My tabs in the IDE are 2 spaces.
Quote
Title: Re: Understanding OOP
Post by: Parker on December 19, 2005, 01:12:08 PM
What I mean is, look at your code on the forum. It looks fine, has indents and everything. Now copy it and paste it into a new source file. It will have no indents at all at the beginning of the line. At least phpBB converts them to spaces, but it would be nice to have all tabs copied. Maybe this is only a problem with firefox though?
Title: Re: Understanding OOP
Post by: Bruce Peaslee on December 19, 2005, 02:11:29 PM
No problem on my system. Looks exactly the same and compiles.

I'll post the source file while we work on the problem.

(Note: the system won't accept *.src so it's a text file.)
Title: Re: Understanding OOP
Post by: Parker on December 19, 2005, 02:59:39 PM
I see, it copies okay with internet explorer, but not with firefox. I wish it did though.
Title: Re: Understanding OOP
Post by: Vikki on July 09, 2006, 12:01:04 PM
Here's a free book that you can download in pdf format:

http://www.planetpdf.com/developer/article.asp?ContentID=6634

It is Bruce Eckel's thinking in C++

And here is a link to c++ tutorials...just scroll down to the OOP section for classes:

http://www.cplusplus.com/doc/tutorial/

And here's one I haven't looked at yet that talks just about OOP:

http://atomicobject.com/training-material.page
Title: Re: Understanding OOP
Post by: kryton9 on August 31, 2006, 07:43:03 PM
Here is a video about OOP, I found it very entertaining and some nice guest speakers towards the end. It is motivational in helping us embrace OOP and to understand it better.

http://www.turboexplorer.com/videos/worldofobjects.htm

Here are 2 videos from c# about OOP and I think he does a good job explaining it here too. Don't worry about following the code, although it is not that different. The concepts and seeing how they work is the neat part:

http://download.microsoft.com/download/6/2/4/6247616D-A0C7-4552-B622-3F0450DE2462/06CSharp1.wmv
http://download.microsoft.com/download/6/2/4/6247616D-A0C7-4552-B622-3F0450DE2462/06CSharp2.wmv