- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
3 Posted Topics
Client code import java.net.*; import java.io.*; /** * This example illustrates the basic method calls for connectionless * datagram socket. * @author M. L. Liu */ public class Example1Sender { // An application which sends a message using connectionless // datagram socket. // Three command line arguments are expected, in … | |
The only time I know of is when we call the assignment operator. Is there any other moments I should do it? Like any other operator where memory management would be useful? | |
public: Queue() : front(0), back(0) {} void put(TreeNode *ptn) { ListNode *tmp = new ListNode(ptn, 0); if (back == 0) front = tmp; else back->next = tmp; back = tmp; } TreeNode *get() { assert(front); TreeNode *result = front->ptn; ListNode *tmp = front->next; delete front; front = tmp; if (front … |
The End.