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

    How many characters can a CString conatain?

    How many characters can a CString object conatin?



  2. #2
    Guest

    Re: How many characters can a CString conatain?

    As many as you like... Until you run out of memory...


  3. #3
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    Re: How many characters can a CString conatain?

    As many numbers as a long variable can hold.
    2^32.

    Wayne



  4. #4
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: How many characters can a CString conatain?

    I seem to remember seeing somewhere that a CString couldn't hold more than 32767 characters, but I have just tried adding 65536 and it was OK. Has anyone else seen this 'limit'? Perhaps it is a throw-back to 16-bit VC++, where the parameter to GetBuffer() was an int (therefore, a maximum of 32767).



    --
    Jason Teagle
    [email protected]

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