Search:

Type: Posts; User: Lone

Search: Search took 0.00 seconds.

  1. Replies
    1
    Views
    2,280

    Merging two lists as one

    I'm writing the classic merge sort, but with a linked list rather than arrays (strings are the element being sorted, s is the variable used). I'm having problems writing the method that merges two...
  2. Replies
    3
    Views
    12,374

    My bad, I should've specified, the binding and...

    My bad, I should've specified, the binding and listening is all in the seperate MakeServerSocket method.
  3. Replies
    3
    Views
    3,429

    Ah, good point, so wouldl this added if statement...

    Ah, good point, so wouldl this added if statement do the trick?



    Node *Node::split() {
    if (next == NULL) return this; // if next is null, return this as list cannot be split...
  4. Replies
    3
    Views
    3,429

    Dividing a linked list in half recursively

    I'm pretty sure I'm on the right track with this, it's simply a method to split a linked list in half, setting it up for a merge sort. My intent is to split the list like this:

    a->b->c->d->e
    ...
  5. Replies
    3
    Views
    12,374

    Using fork() to accept multiple clients

    I've already written a simple chat client, and now I'm trying to write a server that will accept messages from multiple clients at once (using the fork() command). I've been reading up on it and...
  6. Replies
    10
    Views
    1,708

    I appreciate all the help and replies so far, but...

    I appreciate all the help and replies so far, but I've got another related question (of course :))

    Edit: Answered my own question.
  7. Replies
    10
    Views
    1,708

    Building an array of ints

    I'm trying to build an array of integers, in which the number of elements of the array is determined by the length of a string parameter (which is an integer). The intent is to build a list...
  8. Replies
    2
    Views
    1,183

    Ah, good point, now I feel dumb, of course the...

    Ah, good point, now I feel dumb, of course the 'else' won't be seen if the string asked to remove either is or isn't one in the list :) Problem fixed. I appreciate the help.
  9. Replies
    2
    Views
    1,183

    Removing an item from a linked list

    So I'm building this linked list, with all the adding, and deleting of Nodes done in the Node class themself (managed by a List class). Now I've got the methods working to add and remove elements to...
  10. Replies
    9
    Views
    1,705

    Alrighty, everything worked as it should after...

    Alrighty, everything worked as it should after throwing in the second cin.get() line and switching to namespace std, thanks a ton for the help. For confirmation, I've got one last question on this...
  11. Replies
    9
    Views
    1,705

    Thanks for the replies so far. That helps keep...

    Thanks for the replies so far. That helps keep the console window up so I can enter the numbers, but when I enter them and press enter (which calculates the sum of the numbers) the console screen...
  12. Replies
    9
    Views
    1,705

    I know, dumb question but...

    I'm new to C++, but not to programming in general (know a bit of Java). I finally found a decent compiler (Dev cpp) and got to work on a program that adds a couple of numbers together. Everything...
Results 1 to 12 of 12