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 : 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> #include <iostream.h>
<br> struct point
<p> int x;
<br> int y;
<br> void initialise(int,int);
<br> void deplace(int,int);
<br> void affiche();
<br> };
<br> void point::initialise(int abs,int ord)
<br> {x=abs;y=ord;}
<br> void point::deplace(int dx,int dy)
<br> {x+=dx;y+=dy;}
<br> void point::affiche()
<br> {cout <<"je suis en "<<x<<" "<<y<<"\n";}
<br> int main()
<p> point a,b;
<br> a.initialise(5,2);
<br> a.affiche();
<br> a.deplace(-2,4);
<br> a.affiche();
<br> b.initialise(1,-1);
<br> b.affiche();
<br> return 0;
<br> }</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... 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 -