1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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