delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/08/21:11:43

Date: Mon, 8 Dec 1997 18:09:48 -0800 (PST)
Message-Id: <199712090209.SAA11966@adit.ap.net>
Mime-Version: 1.0
To: bobbymcn AT www DOT the-link DOT net, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: collisons in GRX

At 03:20  12/6/1997 -0600, Robert McNulty wrote:
>I have a program that moves four to 6 balls on the screen. I want them
>to bouncs off the walls and off each other. I'm using GRX 2.2.
>How do I do this??
You may have more success posting to somewhere like
comp.graphics.algorithms, since your question is not specific to DJGPP.

Good luck, though.

Nate Eldredge
eldredge AT ap DOT net



the class definitions in one file, foo.h,
>and the member functions in another file, foo.cc.  I then made sure that I
>put #include "foo.h" in my main.cc, and #include "foo.h" in my foo.cc file.
> 
>Also in my foo.h file I put
>#ifndef foo_h
>#define foo_h
>//includes and code
I suspect this is your problem. Generally, you aren't supposed to put code
in a header file, except for small inline functions. I suspect what happens
is that some non-static, non-inline functions are compiled more than once in
the project, leading to a clash when they're linked.
>#endif
>Now when I compile it, it says that my class functions are declared more
>than once.  What could be causing this problem?  I have looked through
>source code written for Borlands compiler and I am doing nothing diffrent
>as far as the definitions go.  I am using Rhide 1.4 as my editor under
>Windows 95.
I hope my suggestion above helps. Note that I don't use C++ much, so take it
with a grain of salt. If you can't figure it out, reduce the source code to
the smallest piece that demonstrates your problem and post it. Oh yeah, you
might have more luck posting to comp.lang.c++ since this is not a
DJGPP-specific issue.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019