home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.dsi.unimi.it!valentm
- From: valentm@ghost.dsi.unimi.it (marco valentini)
- Subject: prototyping object?
- Organization: Computer Science Dep. - Milan University
- Date: Tue, 22 Dec 1992 11:45:24 GMT
- Message-ID: <1992Dec22.114524.421@ghost.dsi.unimi.it>
- Summary: I need a prototyping for object
- Lines: 37
-
-
- I have written the following code:
- class paolo; //!Is Right this ??????
- object pippo
- {
- paolo* p;
- public:
- void ....
- ..... (various methods)
-
- }
- object paolo
- {
- pippo* pi;
- public:
- int ...
- ...(variuos methods)
- }
-
- then I have do pippoobj=new pippo
- paoloobj=new paolo
- then the constructor of two object assign the value of pippoobj->pi=paoloobj
- paoloobj->p=pippoobj
- but when I access to the pippo's methods via pi the compiler tell me that
- pippo obj don't have this methods.
- where is my error (I think in prototiping the class paolo with class paolo;)
-
- Thanks to anyone want help me.
-
-
- Valentini Marco
- Dip. Scienze Informazione
- Univ. Milano (IT)
-
- Mail at valentm@pippo.sm.dsi.unimi.it
-
-
-