CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 1999
    Posts
    33

    how to return an empty CString?

    I am porting an app to vs.net 2003. The person that originally wrote this app returns afxEmptyString if he wanted to return an empty CString object. Evidently, afxEmptyString is deprecated. What is the commonly accepted way of doing this?

    thanx

  2. #2
    Join Date
    Jun 2003
    Posts
    2
    Hi,

    I don't know what the commonly accepted way is. But i'm using the following:

    return _T("");

  3. #3
    Join Date
    May 1999
    Location
    Houston, Texas
    Posts
    81
    You can also:

    return CString();

    which calls the constuctor for a CString which by default is empty.

    Who was that masked man?

  4. #4
    Join Date
    Aug 1999
    Posts
    33

    thanx! (nm)

    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured