title: Repeated errors despite correct namespace
body: <p>I added a class to <code>ns3</code> and when using it I keep getting the error:</p>
  
  <pre><code>../scratch/seven.cc: In function ‘int main(int, char**)’:
  ../scratch/seven.cc:102:3: error: ‘RandomAppHelper’ was not declared in this scope
     RandomAppHelper source = RandomAppHelper ("ns3::TcpSocketFactory", InetSocketAddress (Ipv4Address ("192.168.1.10"), 10));
     ^
  ../scratch/seven.cc:103:3: error: ‘source’ was not declared in this scope
     source.SetAttribute ("Delay", StringValue ("Constant:2.5"));
     ^
  </code></pre>
  
  <p>The code for this is here: <a href="https://www.nsnam.org/docs/release/3.3/doxygen/application.html" rel="nofollow">https://www.nsnam.org/docs/release/3.3/doxygen/application.html</a></p>
  
  <p>I can't resolve the error. I used the correct <code>namespace</code> <code>ns3</code> in the code. Since the error is of "not declared in scope", I am not sure how to rectify it.</p>
  
  <p>Here is my implementation of the helper class (which I am using):</p>
  
  <pre><code>#include "ns3/log.h"
  #include "ns3/address.h"
  #include "ns3/node.h"
  #include "ns3/nstime.h"
  #include "ns3/socket.h"
  #include "ns3/simulator.h"
  #include "ns3/socket-factory.h"
  #include "ns3/packet.h"
  #include "ns3/uinteger.h"
  #include "ns3/trace-source-accessor.h"
  #include "ns3/tcp-socket-factory.h"
  #include "random-helper.h"
  
  namespace ns3{
  
  RandomAppHelper::RandomAppHelper (std::string protocol, Address remote)
  {
    m_factory.SetTypeId ("ns3::MpTcpBulkSendApplication");
    m_factory.Set ("Protocol", StringValue (protocol));
    m_factory.Set ("Remote", AddressValue (remote));
  }
  
  void
  RandomAppHelper::SetAttribute (std::string name, const AttributeValue &amp;value)
  {
    m_factory.Set (name, value);
  }
  
  ApplicationContainer
  RandomAppHelper::Install (Ptr&lt;Node&gt; node) const
  {
    return ApplicationContainer (InstallPriv (node));
  }
  
  ApplicationContainer
  RandomAppHelper::Install (std::string nodeName) const
  {
    Ptr&lt;Node&gt; node = Names::Find&lt;Node&gt; (nodeName);
    return ApplicationContainer (InstallPriv (node));
  }
  
  ApplicationContainer
  RandomAppHelper::Install (NodeContainer c) const
  {
    ApplicationContainer apps;
    for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
      {
        apps.Add (InstallPriv (*i));
      }
  
    return apps;
  }
  
  Ptr&lt;Application&gt;
  RandomAppHelper::InstallPriv (Ptr&lt;Node&gt; node) const
  {
    Ptr&lt;Application&gt; app = m_factory.Create&lt;Application&gt; ();
    node-&gt;AddApplication (app);
  
    return app;
  }
  
  
  }
  </code></pre>
  
  <p>This class is defined in the applications folder of ns3, which is included via the <strong>applications-module.h include.</strong>  And in my code I have included it at the place where I use the RandomAppHelper.</p>