title: no ‘void beeGenerator::initialize()’ member function declared in class
body: <p>Ohayou.</p>
  
  <p>I've had read about this error in many topics before asking, but I couldn't solve this by myself. I'm sorry for bother about it.</p>
  
  <p>My problem is:</p>
  
  <p>I have two files, one is a .cpp and other a .h file.</p>
  
  <p>My cpp file is:</p>
  
  <pre><code>#include "beeGenerator.h"
  
  void beeGenerator::initialize()
  {
      myAddress = par("address");
      sleepTime = (double) par("sleepTimeAtStart");
      beeGenInterval = (double) par("iaTime");
      beeLength = (int) par("beeLength");
      bID = 0;
      packetCount = 0;
  
      debug = true;
      logResults = par("logResults");
  
      const char *statModulePath = (char*) par("statModulePath");
  
      launchNewBees = new cMessage("launchNewBees");
      scheduleAt( simTime() + sleepTime, launchNewBees);
  }
  
  void beeGenerator::handleMessage ()
  {
      if(dynamic_cast&lt;samplePacket *&gt; (msg) != NULL)  
      {
          samplePacket *dPacket = dynamic_cast&lt;samplePacket *&gt; (msg);
          delete dPacket;
          packetCount++;
  
          if( (packetCount % packetInterval) == 0)
          {
              packetCount = 1;
              launchNewBeeAgents();
          }
      }
      else if (msg == launchNewBees)
      {
          launchNewBeeAgents();
          if(simTime() &gt;= 30.0 )
          {
              scheduleAt(simTime() + beeGenInterval, launchNewBees);
          }
          else
          {
              scheduleAt(simTime() + 1.0, launchNewBees);
          }
      }
  }
  
  void beeGenerator::launchNewBeeAgents()
  {
      char msgName[70];
      sprintf(msgName,"Bee%d : Source%d", bID, myAddress);
      beeAgent *bMsg = new beeAgent(msgName);
      bMsg-&gt;setBID(bID++);
      bMsg-&gt;setSourceAddress(myAddress);
      bMsg-&gt;setKind(static_cast&lt;int&gt; (NETLAYER_BEE_AGENT));
      bMsg-&gt;setSourceModule(BEE_GEN_MODULE);
      bMsg-&gt;setLength( BYTE * beeLength);
      send(bMsg,"toRouter");
  }
  
  int beeGenerator::getBID()
  {
      return bID;
  }
  
  void beeGenerator::setBID(int id)
  {
      bID = id;
  }
  
  void beeGenerator::finish()
  {
      ev &lt;&lt; "*** Module: " &lt;&lt; fullPath() &lt;&lt; "***" &lt;&lt; endl;
      ev &lt;&lt; "Stack allocated:      " &lt;&lt; stackSize() &lt;&lt; " bytes";
      ev &lt;&lt; " (includes " &lt;&lt; ev.extraStackForEnvir() &lt;&lt; " bytes for environment)" &lt;&lt; endl;
      ev &lt;&lt; "Stack actually used: " &lt;&lt; stackUsage() &lt;&lt; " bytes" &lt;&lt; endl;
  }
  </code></pre>
  
  <p>My .h file is:</p>
  
  <pre><code>#ifndef __BEE_GENERATOR_H
  #define __BEE_GENERATOR_H
  
  #include "beeInclude.h"
  
  
  class beeGenerator 
  {
      class sPtr{
          bool debug;
          bool logResults;
          double beeGenInterval;
          double sleepTime;
          int beeLength;
          int myAddress;
          int bID;
          int packetCount;
  
          virtual void initialize();
          virtual void handleMessage();
          virtual void finish();
          virtual void launchNewBeeAgents();
          int getBID();
          void setBID(int id);
  
      };
  };
  
  #endif
  </code></pre>
  
  <p>and the errors are</p>
  
  <pre><code>protoname/beeGenerator.cc:3:31: error: no ‘void beeGenerator::initialize()’ member function declared in class ‘beeGenerator’
   void beeGenerator::initialize()
                                 ^
  protoname/beeGenerator.cc:21:35: error: no ‘void beeGenerator::handleMessage()’ member function declared in class ‘beeGenerator’
   void beeGenerator::handleMessage ()
                                     ^
  protoname/beeGenerator.cc:49:39: error: no ‘void beeGenerator::launchNewBeeAgents()’ member function declared in class ‘beeGenerator’
   void beeGenerator::launchNewBeeAgents()
                                         ^
  protoname/beeGenerator.cc:62:26: error: no ‘int beeGenerator::getBID()’ member function declared in class ‘beeGenerator’
   int beeGenerator::getBID()
                            ^
  protoname/beeGenerator.cc:67:33: error: no ‘void beeGenerator::setBID(int)’ member function declared in class ‘beeGenerator’
   void beeGenerator::setBID(int id)
                                   ^
  protoname/beeGenerator.cc:72:27: error: no ‘void beeGenerator::finish()’ member function declared in class ‘beeGenerator’
   void beeGenerator::finish()
  </code></pre>
  
  <p>What can I do? :(</p>
  
  <p>Thanks!</p>