Search:

Type: Posts; User: meili100

Page 1 of 12 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thanks. Basically what I want is that: I want a...

    Thanks. Basically what I want is that: I want a big picture of function call relationship in a source code. Given a function I can know who's the caller, and who are the caller's callers, etc. I want...
  2. Is there a tool to depict function/class relationship in source code

    I am reading a big source code and got confused by function calls/ class inheritance.
    I was wondering if there is an off-the-shelf tool to show the relationships between the function calls.
    Is...
  3. I think it's not "read only". In fact you can...

    I think it's not "read only". In fact you can modify it:


    Char x [] = "abc";
    x[0] = 'z';

    The memory that x points to is NOT a literal.
  4. If it's Char * x = "abc"; I think you are...

    If it's

    Char * x = "abc";
    I think you are right.

    But for

    Char x[] = "abc";
    I think compiler allocate 4 bytes memory on heap and copy "abc\0" to the space.
    Am I right?
  5. Thanks. x is defined at global scope. I think...

    Thanks. x is defined at global scope. I think it's on heap, right?
  6. Where does compiler allocate memory for Char x[] = "abc" ?

    Where does compiler allocate memory for "abc" that x points to?
    I think it's on heap. Am I right?
    (assume Char x[] = "abc" is defined at global scope)

    Added: Please note that I mean the "abc" x...
  7. A simple C++ inherience code sinpet: how could this happen?!

    class Base{
    public:
    void foo(){cout<<"base foo"<<endl;}
    };

    class Derived: public Base{
    public:
    void foo(){cout<<"derivde foo"<<endl;}
    };
  8. Replies
    3
    Views
    1,624

    Thanks lot. 1) Why strchr needs 0xFF with 0 at...

    Thanks lot.
    1) Why strchr needs 0xFF with 0 at the beginning? Why not eof = "\0xFF"?
    2) Why strchr does not need to escape 0 ?
  9. Replies
    3
    Views
    1,624

    An interesting question about strcat

    Why the following code prints "Huh?" ?
    It seems that 0xFF is never appended to the list by strcat?


    #include <stdio.h>
    #include <string.h>

    const char * const eof = "\0xFF";
    char list[2000]...
  10. Can Nested class access parent class's private member?

    I write the following code. It seems that a nested class (inner class) can access its parent class's private member. BUT in the book <thinking in C++> 's chapter :introduction to template, it...
  11. What's wrong with the "friend template" snippet

    I am following the http://www.parashift.com/c++-faq-lite/templates.html#faq-35.16 to write the snippet below:


    template<typename T>
    class Foo {
    public:
    Foo(const T& value = T());

    ...
  12. Replies
    4
    Views
    2,892

    Why the example C++ code in MSDN is wrong?

    I copied the exact code from MSDN here http://msdn.microsoft.com/en-us/library/f1b2td24.aspx


    // template_friend1.cpp
    // compile with: /EHsc

    #include <iostream>
    using namespace std;
    ...
  13. Replies
    6
    Views
    895

    What's "private inheritence" for?

    It seems that Derived class still can access Base::z?


    class Base{
    public:
    int z;
    Base(){
    cout<<"Base::Base()"<<endl;
    }
    ~Base(){}
  14. inefficiency in terms of what?

    inefficiency in terms of what?
  15. Why C++ does not have a similar method like "instanceof" in JAVA?

    JAVA has "instanceof". Why C++ only has "typeid" and "dynamic_cast"?
    Is there any reason or concern JAVA implements it but C++ doesn't?
  16. Why Scott Meyers wants you to slap yourself?

    From Effective C++, by Scott Meyers :

    "Anytime you find yourself writing code of the form "if the object is of type T1, then do something, but if it's of type T2, then do something else," slap...
  17. Thanks. I am a C++ programmer and just want to...

    Thanks. I am a C++ programmer and just want to quickly get started with java for simple JAVA programming.
    This book seems not be a good learning book. Any book to recommend? Thanks.
  18. Is this book good for C++ programmers?

    Is this book, <JAVA in a netshell> 4th ed, a good book?
    http://www.amazon.com/Java-Nutshell-Fourth-David-Flanagan/dp/0596002831/

    Has anybody read it? I am a C++ programmer and just want to...
  19. Replies
    5
    Views
    1,026

    Thanks all, gg: Your links don't work?...

    Thanks all,
    gg: Your links don't work?
    CornedBee: I still don't understand why the first is better in terms of avoiding spurious wakeups. Would you elaborate more?
  20. Replies
    5
    Views
    1,026

    A quick question about pthread_cond_wait()

    Suppose multiple producers and consumers share a common queue.
    Consumers are signaled when any producer puts data to the queue.

    1. Does the following code has race condition?



    //Producer:...
  21. Nope neither helps. I almost give up. Thank you...

    Nope neither helps. I almost give up. Thank you anyway for the help.
  22. Yes, my backspace works correctly.

    Yes, my backspace works correctly.
  23. Got it. It seems that this post does not apply to...

    Got it. It seems that this post does not apply to my case.
    When I press down "Delete" Key, the screen shows ~ rather than ^H or ^?
    I tried

    stty erase ~
    or

    stty erase ^?
    Neither work,...
  24. Thanks. I keep refreshing this thread to get the...

    Thanks. I keep refreshing this thread to get the answer.
    No I ssh from a linux box as well. In this one it works.
  25. Yes. my Delete is fine. BTW, the problematic...

    Yes. my Delete is fine.
    BTW, the problematic machine is a Linux server that I connect to by ssh.
Results 1 to 25 of 286
Page 1 of 12 1 2 3 4