delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/21/11:20:21

Message-ID: <38370EAD.BC7415FF@surfree.net.il>
Date: Sat, 20 Nov 1999 23:12:14 +0200
From: Borja Aranovic <spile_nomaed AT surfree DOT net DOT il>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Debugging Rhide C++ Struct
References: <80mtke$baf$1 AT wanadoo DOT fr>
NNTP-Posting-Host: 212.3.198.194
X-NNTP-Posting-Host: 212.3.198.194
X-Trace: 20 Nov 1999 23:12:01 +0200, 212.3.198.194
Lines: 50
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Regis DUPUY wrote:
<blockquote TYPE=CITE>Hi
<br>The little program below wich is a c++ example for struct compile
<br>and run but I can't trace it with F7 (rhide debugger)
<br>it jumps over the first line&nbsp; :&nbsp; point a,b;
<br>then it trace back ,then it stay at the same place and it ends
<br>is it impossible to debug C++ program with rhide if those programs
<br>have struct definitions ?
<p>&nbsp;#include &lt;iostream.h>
<br>&nbsp;struct point
<p>&nbsp;&nbsp; int x;
<br>&nbsp;&nbsp; int y;
<br>&nbsp;&nbsp; void initialise(int,int);
<br>&nbsp;&nbsp; void deplace(int,int);
<br>&nbsp;&nbsp; void affiche();
<br>&nbsp;};
<br>&nbsp;void point::initialise(int abs,int ord)
<br>&nbsp;{x=abs;y=ord;}
<br>&nbsp;void point::deplace(int dx,int dy)
<br>&nbsp;{x+=dx;y+=dy;}
<br>&nbsp;void point::affiche()
<br>&nbsp;{cout &lt;&lt;"je suis en "&lt;&lt;x&lt;&lt;" "&lt;&lt;y&lt;&lt;"\n";}
<br>&nbsp;int main()
<p>&nbsp;&nbsp; point a,b;
<br>&nbsp;&nbsp; a.initialise(5,2);
<br>&nbsp;&nbsp; a.affiche();
<br>&nbsp;&nbsp; a.deplace(-2,4);
<br>&nbsp;&nbsp; a.affiche();
<br>&nbsp;&nbsp; b.initialise(1,-1);
<br>&nbsp;&nbsp; b.affiche();
<br>&nbsp;&nbsp; return 0;
<br>&nbsp;}</blockquote>
Hmm... Tried that, couldn't trace it either... something maby wrong with
RHIDE... i am not sure though...
<br>I changed it to Class and same thing happened... interesting (bug?)
problem... hope somebody has an answer...
<p>oh.. yea...&nbsp; by the way, what do you need:
<p>int main(){
<br>...
<br>return 0;
<br>}
<p>i think it's easier to use:
<p>void main(){
<br>...
<br>}
<p>without any return...
<p>Ciao.</html>

- Raw text -


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