Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: LarryChen

Page 1 of 42 1 2 3 4

Search: Search took 0.06 seconds.

  1. Re: dbgpSocket: error: unable to connect to remote host?

    Yes, I searched on google but no luck.
  2. dbgpSocket: error: unable to connect to remote host?

    Actually I tried to use dbgpavim to debug a python program on linux. So I typed in sudo ./pydbgp -d 127.0.0.1:9009 ~/myProjectj/main.py on linux but I got an error message "dbgpSocket: error: unable...
  3. Replies
    4
    Views
    729

    Re: What is wrong with this code?

    Basically after this statement r = FindAncestor(root->right, p, q) is called, root is not the original root. So it fails the statement l = FindAncestor(root->left, p, q). But I don't know how to fix...
  4. Replies
    4
    Views
    729

    What is wrong with this code?

    node* FindAncestor(node* root, node* p, node* q)
    {
    node* l;
    node* r;

    if (root == NULL)
    return NULL;

    if (root->left == p || root->right == q || root->left == q || root->right == p)...
  5. Replies
    3
    Views
    484

    Re: Why is there an exception?

    I got it. Thanks. How am I able to debug such error? It seems the debugger won't point to the correct statement when such exception is thrown.
  6. Replies
    3
    Views
    484

    Why is there an exception?

    Here is the code,


    bool isRotational(char* s1, char* s2)
    {
    int len = strlen(s1);
    char* s = new char[2 * len + 1];
    char* p = s1;
    char* q = s;
  7. Replies
    12
    Views
    1,025

    Re: A question regarding protected member

    Thanks. I found that it is also true that D's default constructor, copy constructor, destructor are IMPLICITLY public.
  8. Replies
    12
    Views
    1,025

    Re: A question regarding protected member

    My question is that why the copy assignment of D is public instead of protected like foo? Thanks.
  9. Replies
    12
    Views
    1,025

    Re: A question regarding protected member

    Actually I don't have any trouble understanding the behavior of foo but I just don't understand why assignment operator behaves differently. Thanks.
  10. Replies
    12
    Views
    1,025

    Re: A question regarding protected member

    It is true but you have to do that EXPLICITLY. For example the member function foo is declared as protected in class B but you can declare it as public in D explicitly. Otherwise foo should be...
  11. Replies
    12
    Views
    1,025

    Re: A question regarding protected member

    But since assignment operator is declared as protected in class B and also D is public inherited, then the assignment operator in D should be still protected. Why assignment operator doesn't follow...
  12. Replies
    12
    Views
    1,025

    Re: A question regarding protected member

    But D will inherit the member function foo too. How come we can't call foo on D as an assignment operator is called on D? Thanks.
  13. Replies
    12
    Views
    1,025

    A question regarding protected member

    Here is the example,


    class B
    {
    protected:
    B& operator=(const B&)
    {
    return *this;
    }
  14. Is there any free tool to detect memory leak in C#?

    In C# memory leak doesn't happen often. But when it happens, then it is really hard to find out. Please recommend a free tool for me to detect the memory leak in C# application. Thanks.
  15. A question regarding the size of a class with virtual functions

    Here is an example,


    class A
    {
    public:
    virtual void foo(){}
    virtual void foo2(){}
    virtual void foo3(){}
    };
  16. Replies
    7
    Views
    1,300

    Re: An interesting multithreading question

    I am not sure if I understand your idea correctly. Suppose we have three threads A, B and C. When thread A that will pass value 16 to the function tries to access the dictionary, since the dictionary...
  17. Replies
    16
    Views
    2,159

    Re: A question regarding stack size

    Could you be more specific how much memory will be used on these two approaches separately? Assuming there is totally 10 nodes in the linked list in both cases. Thank you very much!



    //...
  18. Replies
    7
    Views
    1,300

    An interesting multithreading question

    Supposedly we have a method which accepts an integer as an argument and print on console. This method is accessed by multiple threads. If two or more threads call the method with same value then only...
  19. Replies
    16
    Views
    2,159

    Re: A question regarding stack size

    If we do that in an iterative way in the following,


    void ReadBack(node* head)
    {
    stack st;

    while(head)
    {
    st.push_back(head);
  20. Replies
    16
    Views
    2,159

    Re: A question regarding stack size

    So based on the original post, the used stack size for the function would be (10+1(last call: ReadBack(NULL))+1(return address))*4? When we apply recursion on linked list or tree, the stack size...
  21. If I run the same program twice under linux

    what section would be shared in the memory? Thanks.
  22. Please help me understand optimistic locking and Pessimistic locking

    I read the documents about them but couldn't really understand them. Could any database guru here explain what they are in examples. Thanks a lot!
  23. Replies
    16
    Views
    2,159

    Re: A question regarding stack size

    So my understanding is that for each function call in the recursion, 4 bytes are needed for node*, 4 bytes are needed for returned address. But what about stack frame? Do we need stack frame for each...
  24. Replies
    2
    Views
    833

    Find n words given m threads

    I came across this question, You are given a paragraph , which contain n number of words, you are given m threads. What you need to do is , each thread should print one word and give the control to...
  25. A question from the book "More effective C++".

    In this book, item 3 is about never treat arrays polymorphically. In the latter part of this item, the author talks about the result of deleting an array of derived class objects through a base class...
Results 1 to 25 of 1028
Page 1 of 42 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


HTML5 Development Center