Category : arguments

I’m developing a networking library in C++. I have a method that sends a network packet. Signature: void Send(PacketId packet_id, const UserPacket& user_packet, const std::shared_ptr<RemoteSystem>& remote_system, bool broadcast, std::function<void(Packet* p)>&& response_callback, uint32_t response_timeout, std::function<void()>&& response_timeout_callback, uint32_t response_to_packet); Arguments: packet_id – Packet id user_packet – User packet data remote_system – remote system to send a packet ..

Read more

I wish to be able to manipulate function arguments by the order in which they are given. So, void sum(int a, int b, int c) std::cout<< arguments[0]+arguments[1]; sum(1,1,4); should print 2. This feature is in Java, I found out about it here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments. I need it to implement a numerical scheme. I’d create a function ..

Read more