Message: Re: the application of your own field.help me. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Warning Re: the application of your own field.help me. 

Keywords: field
Forum: Fields: Magnetic and Otherwise
Re: Angry the application of your own field.help me.
Re: Question Re: the application of your own field.help me. (Gumplinger Peter)
Re: Question Re: the application of your own field.help me.
Date: 07 Mar, 2005
From: John Apostolakis <John Apostolakis>

I think that the issues has to do with class declarations. The compiler is complaining because a semicolon is missing at the end of the declaration of the class 'radialEfield':

#ifndef radialEfield_H
#define radialEfield_H
#include "G4Types.hh"
#include "G4ThreeVector.hh"
#include "G4ElectricField.hh"
class radialEfield : public G4ElectricField
{
  public: 
   radialEfieldfield( G4double Voltage, G4double b, G4double a);

   virtual void GetFieldValue(const    G4double pos[4], 
                              G4double *field) const;
  private: 
   G4double fv;
   G4double fba;
}
#endif 

The lines before the '#endif' should read instead:

 };     // Clossing the declaration of radialEfield

The reason this ';' is required is that it is possible to create an object of a class that you just declared. Putting the semicolon and no object name (as in most include files) shows that you are doing this without creating an object of the class.

Regards, John.

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

 Add Message Add Message
to: "Re: the application of your own field.help me."

 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 ]