Message: error in steppingaction and main Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question error in steppingaction and main 

Forum: Event and Track Management
Date: 15 May, 2014
From: kunli <kunli>

I met an error when compiling, could some one give me a help? Thank you.
error: error: no matching function for call to ‚SteppingAction::SteppingAction()‚
     runManager->SetUserAction(new SteppingAction);
SteppingAction.hh:26:3: note:   candidate expects 2 arguments, 0 provided

Part of my code:

int main(int argc, char* argv[]){
runManager->SetUserAction(new SteppingAction);

class SteppingAction: public G4UserSteppingAction{
  SteppingAction(DetectorConstruction*, EventAction*);
  virtual ~SteppingAction();
detector = (DetectorConstruction*)
eventaction = (EventAction*) 

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: error in steppingaction and main   (Gumplinger Peter - 15 May, 2014)
(_ Ok: Re: error in steppingaction and main   (kunli - 16 May, 2014)
 Add Message Add Message
to: "error in steppingaction and main"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]