title: Removing White Spaces in MFC C++
body: <p>Good day. I am currently doing a Server-Client Chat Program using sockets in MFC C++ (in Visual Studio 2010). This is my first C++ program as we were never taught of the said language way back in college (shame)</p>
  
  <p>Anyways, so far I've been doing good. Then, I have added string length which would count how many characters were sent. Thankfully, because of searching the internet and forums, I've made it work. Then here's my problem, the code counts the white spaces and I don't need that. I read about .Trim() but its not what I need. I also did try .Replace() but it's not working. Any other ideas? Here's my code.</p>
  
  <blockquote>
    <p>//string length //m_Msg is my message</p>
  
  <pre><code>CString strCount;
  strCount = m_Msg;
  </code></pre>
    
    <p>//strCount = strCount.Replace(" " , "");
        int Count = strCount.GetLength();</p>
  </blockquote>
  
  <p>Thanks, thanks for any ideas that may help. </p>