User Profile

Collapse

Profile Sidebar

Collapse
readerMadsen123
readerMadsen123
Last Activity: Dec 22 '09, 02:40 PM
Joined: Dec 19 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • readerMadsen123
    replied to Generic stack problem
    in C
    ziamughal, if you are trying to figure out how generics work in C++, try modifying your stack implementation to be generic.
    If you just need a stack, go with the one from standard template library, like weaknessforcats says.
    http://www.cplusplus.com/reference/stl/stack/...
    See more | Go to post

    Leave a comment:


  • readerMadsen123
    replied to Generic stack problem
    in C
    Yes, but i think the guy wants to roll his own - for educational purposes or something
    See more | Go to post

    Leave a comment:


  • readerMadsen123
    replied to Client Server application
    If you want the client part to just pass a command, in a sort of "fire and forget" mode, you just need to implement a queue of some sort.
    You can do it simple by adding a file to a folder, and having the server scan.
    You can do it using a socket connection.
    You can do it using a HTTP request.
    You can do it using a Database, and a "server" in the database as a stored procedure, or a server polling the database....
    See more | Go to post

    Leave a comment:


  • readerMadsen123
    replied to Design Issue
    I would always go for the union,

    If the user selects something and tries to delete, there should be no reason to leave out deleting some.. They are selected, and therefore deleted, right??
    See more | Go to post

    Leave a comment:


  • readerMadsen123
    replied to Generic stack problem
    in C
    You should start along the line of..

    template <class T>
    class stack
    {

    public:
    stack();
    void push(const T&);
    void pop();
    void display();
    const T& topelement();
    bool isEmpty();
    void makeEmpty();

    private:
    struct Node
    {
    T data;
    Node* preptr;
    };
    Node* current,*head,* top;

    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...