Search:

Type: Posts; User: AnishaKaul

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Implementing Observer pattern when observers wish to observe different items

    Below I have attempted to write a sudo code for the Observer pattern when observers wish to observe different items.
    Ignore the syntax errors. I wish to know if this is the correct way to implement...
  2. Implementing a chat program and thus involving majority of networking concepts.

    This is what I have thought:

    Logging the chat messages (exchanged by the
    clients) on the server.
    Registration of ALL clients on the server on
    their start up.
    Client should be able to add...
  3. Thanks, but replies weren't `too` helpful....

    Thanks, but replies weren't `too` helpful.
    Anyway, can we "see" the debugging symbols somewhere, through GDB?
    Perhaps I'll be able to understand them better then.
  4. Meaning of 'debugging symbols' with respect to GDB

    Wikipedia says:


    1. Any examples of what kind of programming-language constructs are used for the purpose?
    2. What is the meaning of "constructs" in this context? Functions?

    Please try...
  5. Replies
    24
    Views
    2,768

    Now I realize that I was getting confused by the...

    Now I realize that I was getting confused by the sequence of the events, the base class is indeed getting called first, but my problem is NOT yet solved, I'll get back to you soon.

    Thanks again.
  6. Replies
    24
    Views
    2,768

    See this: The green one too executes and func....

    See this: The green one too executes and func. gets called. but still the red statement gets executed.


    #include <iostream>
    #include <vector>
    #include <string>
    using namespace std;
    ...
  7. Replies
    24
    Views
    2,768

    I did that Elysia, before posting here, it...

    I did that Elysia, before posting here, it resulted in the same problem as stated in my last post, that's why I replaced it with the BaseClass's object.


    Nothing, I just want to fill that vector...
  8. Replies
    24
    Views
    2,768

    Thanks for all the effort, Elysia, now I please...

    Thanks for all the effort, Elysia, now I please make me understand why can't the values in the derived class be reflected in the base class:

    I think the problem is that I should call the the...
  9. Replies
    24
    Views
    2,768

    Thanks for all the effort, I tried to call the...

    Thanks for all the effort, I tried to call the vector in the derived class, I failed :(


    #include <iostream>
    #include <vector>
    using namespace std;

    template <class MyDummyClass, typename...
  10. Replies
    24
    Views
    2,768

    Yes you are right, I explained it wrongly,...

    Yes you are right, I explained it wrongly, templates do pass types at compile time,

    What I want to do is:

    The base class which contains the vector, will have various derived classes and the...
  11. Replies
    24
    Views
    2,768

    Actually, that works if I specify the type in the...

    Actually, that works if I specify the type in the base class, but the problem is that the type of the first argument will be decided by the derived class, using a template means that we can pass a...
  12. Replies
    24
    Views
    2,768

    I ve already tried that Elysia, that doesn't...

    I ve already tried that Elysia, that doesn't work: :(


    #include <iostream>
    #include <vector>
    using namespace std;

    template <class MyDummyClass, typename ReturnType, typename Parameter>...
  13. Replies
    24
    Views
    2,768

    I think this makes some sense now: ...

    I think this makes some sense now:


    template<typename t>
    class stuff {
    public:
    vector<t> data;
    };
  14. Replies
    24
    Views
    2,768

    Thank you Elysia and anon. Thanks for...

    Thank you Elysia and anon.


    Thanks for pointing out, it was not a deliberate fault from my side.


    I have corrected that too now, but the error persists.


    It seems I haven't yet...
  15. Replies
    24
    Views
    2,768

    Template vectors

    I tried this:


    #include <iostream>
    #include <vector>
    using namespace std;

    template <class MyDummyClass, typename ReturnType, typename Parameter>
    class SingularCallBack
    {
  16. Replies
    3
    Views
    1,559

    Heap is something from which you can allocate...

    Heap is something from which you can allocate memory (ofcourse at run time)
    The memory can be allocated only to pointer variables.
    Pointer is a variable which points to a location in the heap.
    You...
  17. Replies
    9
    Views
    1,960

    Thank you for that, if I have further queries...

    Thank you for that, if I have further queries I'll post here again.
  18. Replies
    9
    Views
    1,960

    I am sorry if I am missing your point again, but...

    I am sorry if I am missing your point again, but did you mean that the previous entry which I want to be edited should be removed and then a fresh entry with the fresh data should be made?
  19. Replies
    9
    Views
    1,960

    Thanks TabStop, but I didn't understand the...

    Thanks TabStop, but I didn't understand the following:
  20. Replies
    9
    Views
    1,960

    Thanks for replying, Q: Can I edit the key...

    Thanks for replying,

    Q: Can I edit the key itself?

    Q: The value associated with the key is a socket pointer, so even if I exchange the positions of the current key and its value somehow, then...
  21. Replies
    9
    Views
    1,960

    Editing values of a Map

    I have inserted some values in a C++ Map, now I want to edit the value associated with a key. I can insert and delete but how to edit?

    Any hints?

    I have tried this:



    map <unsigned int,...
  22. Replies
    12
    Views
    1,432

    Thanks for bothering :) One incomplete rough...

    Thanks for bothering :)

    One incomplete rough way of representing the structure shown in my first post is by using "structures":


    struct x
    {
    string name;
    int id;
    };
  23. Replies
    12
    Views
    1,432

    Well, can the structure I showed here be...

    Well, can the structure I showed here be represented with a combination of vectors, maps and pairs in any way?
  24. Replies
    12
    Views
    1,432

    I was confused unnecessarily for no obvious...

    I was confused unnecessarily for no obvious reasons :redface: Thanks.
  25. Replies
    12
    Views
    1,432

    I am thankful to you for the enlightenment...

    I am thankful to you for the enlightenment :hattip: Actually recently I had used map and pair (they take multiple arguments) so I was trying to use vector that way!

    Thanks for the clarification...
Results 1 to 25 of 120
Page 1 of 5 1 2 3 4