Message-ID: <38370EAD.BC7415FF@surfree.net.il> Date: Sat, 20 Nov 1999 23:12:14 +0200 From: Borja Aranovic 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> Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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;
 }

Hmm... Tried that, couldn't trace it either... something maby wrong with RHIDE... i am not sure though...
I changed it to Class and same thing happened... interesting (bug?) problem... hope somebody has an answer...

oh.. yea...  by the way, what do you need:

int main(){
...
return 0;
}

i think it's easier to use:

void main(){
...
}

without any return...

Ciao.