[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-user
Subject:    Re: C++ Problem
From:       "Markus Pietrek" <mpietrek () init-ka ! de>
Date:       1998-11-30 7:59:12
[Download RAW message or body]

> sorry I have to ask such kind of Question but I just wrote a small
> Programm as a frontend for Mame and everythink is fine because alot of
> help through you people but nevertheless it is my first Programm in C++
> and even in C :-) therefore I now have a real problem! I wrote a functio=
n
> in a Class from me, then I have called an other class but this class nee=
ds
> this function from the other class again but can=B4t find it !! I hope t=
hat
> somebody can help me! I guess it is quite easy but I don=B4t know how :-=
( 

Try it with two includefiles. Define each class in one include file
and implement it in one or two .cc files.

This would look like

box.h
class box
{
   public:
    void doXXX();
};
------
circle.h
class circle
{
   public:
     void doYYY();
};
-----
box.cc
#include "box.h"

box::doXXX(){}
------
circle.cc
#include "circle.h"
#include "box.h"

circle:doXXX(){box::doXXX();}
-------------

<<An dieser Stelle sollte ein imperialer Sternzerstoerer sein,
  aber aufgrund riesiger Proteste jetzt entfernt>>

May the Force be with You!

Markus Pietrek

Homepage: http://members.xoom.com/pietrek
-- 
Send posts to:  kde-user@lists.netcentral.net
 Send all commands to:  kde-user-request@lists.netcentral.net
  Put your command in the SUBJECT of the message:
   "subscribe", "unsubscribe", "set digest on", or "set digest off"

All kde mailing lists are archived at http://lists.kde.org
**********************************************************************
This list is from your pals at NetCentral <http://www.netcentral.net/>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic