This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

const static string


i got "Internal compiler error 109"  when compiling this code:

#ifndef soundh
#define soundh

#include <iostream.h>
#include <fstream.h>
#include <deque.h>
#include <string>
#include "fxnenvelope.cc"
#include "fourierspec.cc"
#include "sounddiff.cc"
#include "fxnenvdiff.cc"
#include "fspecdiff.cc"

class Sound
{
  private:
    FxnEnvelope *envelope;                 //envelope of the sound function
    FourierSpec *fSpec;                    //fourier transform of the sound function
    double max;                            //max amplitude in this sound
    double min;                            //min amplitude that is considered significant                  

    const static int soundHeader = 15;    //header length of sound file
    const static string soundFile("sound.snd");  //name of praat sound file
    const static string envelopeFile("sound.env");  //name of sound envelope file
    const static string fourierFile("sound.spec");  //name of fourier spectrum file
    const static int chunkSize = 10;      //size of chunks to take when chopping ends
    const static double noiseLevel = 1.0/12.0;  //fraction of max that is considered significant 

    Sound(){}//disallowed
    Sound(Sound&){}//disallowed

    deque<double>* readSound();
    void chopNoise(deque<double>* );
    void chopFront(deque<double>* );
    double avgChunk(deque<double>::iterator);

  public:
    Sound(string);                        //takes a wav file
    ~Sound();

    SoundDiff compare(Sound&);

    friend ostream& operator <<(ostream& os, Sound& aSound);
};

#endif

the error occurred on line 23, where i declared a const static string.  when i
removed the static keyword, the error did not occur.  changing the order of
keywords or not initializing the variable do not make any difference.  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]