delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/14/15:01:43

Message-ID: <382F084E.53726670@lycosmail.com>
Date: Sun, 14 Nov 1999 14:06:55 -0500
From: Adam Schrotenboer <ajschrotenboer AT lycosmail DOT com>
X-Mailer: Mozilla 4.7 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Debugging Rhide C++ Struct
References: <80mtke$baf$1 AT wanadoo DOT fr>
Reply-To: djgpp AT delorie DOT com

Of course, there is no executable code there, it's a static declaration.
Also, turn off optimizations, compile w/ -O0 as last argument.

Regis DUPUY wrote:

> Hi
> The little program below wich is a c++ example for struct compile
> and run but I can't trace it with F7 (rhide debugger)
> it jumps over the first line  :  point a,b;
> then it trace back ,then it stay at the same place and it ends
> is it impossible to debug C++ program with rhide if those programs
> have struct definitions ?
>
>  #include <iostream.h>
>  struct point
>
>    int x;
>    int y;
>    void initialise(int,int);
>    void deplace(int,int);
>    void affiche();
>  };
>  void point::initialise(int abs,int ord)
>  {x=abs;y=ord;}
>  void point::deplace(int dx,int dy)
>  {x+=dx;y+=dy;}
>  void point::affiche()
>  {cout <<"je suis en "<<x<<" "<<y<<"\n";}
>  int main()
>
>    point a,b;
>    a.initialise(5,2);
>    a.affiche();
>    a.deplace(-2,4);
>    a.affiche();
>    b.initialise(1,-1);
>    b.affiche();
>    return 0;
>  }

- Raw text -


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