CString's GetLength mystery

Discussion in 'MFC' started by Swayhand, Aug 30, 2010.

  1. Swayhand

    Swayhand New Member

    Joined:
    Aug 30, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I was testing a variable, the following are two lines:

    TRACE(m_strDirectory);
    TRACE("\nlength: %d\n", m_strDirectory.GetLength());

    and the output is:

    D:\Projects
    length: 0

    how come? Why the length is zero?

    Thanks!
    Sway
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice