-1

In an NS-3 .cc file I am trying to create an array of instantiations of the UdpEchoClientHelperclass, just by doing:

UdpEchoClientHelper echoClient[NO_OF_NODES];

and when I am trying to build I am getting the error message:

../scratch/test.cc:55:33: error: no matching function for call to ‘ns3::UdpEchoClientHelper::UdpEchoClientHelper()’

Am I doing something wrong at the array declaration?

nikos
  • 2,893
  • 11
  • 30
  • 39
  • You can try `std::vector>` and set the smart pointers later. I don't know what UdpEchoClientHelper is specifically, so there may be a more appropriate solution for that type. – Neil Kirk Mar 10 '15 at 15:02

1 Answers1

1

There's no matching constructor for

UdpEchoClientHelper::UdpEchoClientHelper()

These are the available constructors:

   /**
   * Create UdpEchoClientHelper which will make life easier for people trying
   * to set up simulations with echos.
   *
   * \param ip The IP address of the remote udp echo server
   * \param port The port number of the remote udp echo server
   */
  UdpEchoClientHelper (Address ip, uint16_t port);
  /**
   * Create UdpEchoClientHelper which will make life easier for people trying
   * to set up simulations with echos.
   *
   * \param ip The IPv4 address of the remote udp echo server
   * \param port The port number of the remote udp echo server
   */
  UdpEchoClientHelper (Ipv4Address ip, uint16_t port);
  /**
   * Create UdpEchoClientHelper which will make life easier for people trying
   * to set up simulations with echos.
   *
   * \param ip The IPv6 address of the remote udp echo server
   * \param port The port number of the remote udp echo server
   */
  UdpEchoClientHelper (Ipv6Address ip, uint16_t port);

You should take a look to the tutorials first.

Idipaolo
  • 788
  • 5
  • 11