How can I call an enclosing class's function?
From: Eric A. Johnson (nothere_at_dontlookforme.com)
Date: 03/26/05
- Previous message: Hoffmann: "Re: What is wrong with my C program?"
- Next in thread: Anthony Borla: "Re: How can I call an enclosing class's function?"
- Reply: Anthony Borla: "Re: How can I call an enclosing class's function?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 26 Mar 2005 02:01:11 GMT
Hi All,
I have a class, ConsoleWindow, that is a member of another class,
ConsoleLib, like so:
class ConsoleLib
{
public:
class ConsoleWindow
{
public:
ConsoleWindow(HANDLE Screen, COORD Start, COORD Size, bool Border);
~ConsoleWindow();
// etc.
}
void OutputString(char *String);
// etc.
}
How would I call a ConLib function from a ConsoleWindow constructor or
function? I'm trying to call OutputString from ConsoleWindow's constructor.
Is there any way of doing this?
On a side note, should the subclass ConsoleWindow be public or private?
Thanks,
Eric
- Previous message: Hoffmann: "Re: What is wrong with my C program?"
- Next in thread: Anthony Borla: "Re: How can I call an enclosing class's function?"
- Reply: Anthony Borla: "Re: How can I call an enclosing class's function?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|