info-inventor
[Top] [All Lists]

segmentation foult

To: info-inventor@xxxxxxxxxxx
Subject: segmentation foult
From: Jarek Rzepecki <jarekr@xxxxxxxx>
Date: Thu, 30 Aug 2001 11:33:50 -0500 (CDT)
Sender: owner-inventor@xxxxxxxxxxx
Hi!
I have a little problem here... i'm trying to create a new class inherited
from two others. One of them in OIV class - "SoCylinder" :

class VisCyl : public SoCylinder, public TCylinder_t {
public:
  VisCyl(double r, double z);
 
};  

With constructor :

VisCyl::VisCyl(double r, double z){
  TCylinder_t("none",r,z);
  SoCylinder::radius.setValue(r);
  SoCylinder::height.setValue(z);
  
}

and then in code i call:

VisCyl *pppp = new VisCyl(2,5);

Compilation goes well. But when i run the program i got error msg :
"segmentation foult"

Lines that couses the error are:

SoCylinder::radius.setValue(r);
SoCylinder::height.setValue(z);

What am i doing wrong?
Thank you for help...
                                 - jarek
                        
                                        Jaroslaw Rzepecki
                                        Fermilab
                                        23 Neuqua
                                        P O Box 500
                                        Batavia, IL 60510
                                        USA
                
                                        BD/Beam Physics Dept.
                                        630-840-4309 (office)
                                        630-840-4239 (home)
                                        e-mail: jarekr@xxxxxxxx
                                        or    : jarekr@xxxxxxxxxxxxxxxxx
                        


<Prev in Thread] Current Thread [Next in Thread>
  • segmentation foult, Jarek Rzepecki <=