| www.delorie.com/archives/browse.cgi | search |
| From: | "Pavlos" <trash24379 AT usa DOT net> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: multiple define |
| Date: | Sun, 2 May 1999 06:02:08 +0300 |
| Organization: | An OTEnet S.A. customer |
| Lines: | 47 |
| Message-ID: | <7ghcep$4ac$2@newssrv.otenet.gr> |
| References: | <3725BDCA DOT 9BAB73EC AT netvision DOT net DOT il> |
| NNTP-Posting-Host: | dram-a09.otenet.gr |
| X-Trace: | newssrv.otenet.gr 925644057 4428 195.167.113.232 (2 May 1999 11:20:57 GMT) |
| X-Complaints-To: | abuse AT otenet DOT gr |
| NNTP-Posting-Date: | 2 May 1999 11:20:57 GMT |
| X-Newsreader: | Microsoft Outlook Express 4.72.3110.1 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
moshe wrote in message <3725BDCA DOT 9BAB73EC AT netvision DOT net DOT il>...
>hi when i define class in file for exemple "Ccircle.h":
>
>
>typedef class Ccircle {
>private:
> // bla bla bla
>public:
> int initialize(int getX, int getY);
> void cleanup();
> };
>
>and use "Ccircle.cpp" to write his functions:
>
>#include "enemy.h"
>
>int Ccircle::initialize(int getX, int getY) {
>// bla bla bla
>}
>
>void Ccircle::cleanup() {
>// bla bla bla
>}
>
>i get multiple defining error BTW i use anther file "program.cpp"
>whare the program locate and the file start with:
>
>#include "Ccircle.h"
>
>how is the corect defining/declaring that i need to use?
>thanks.
>
Maybe this can solve the problem:
First lines at Ccircle.h
-------------------------------
#ifndef Ccircle_h
#define Ccircle_h
your code
#endif
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |