Thread: CString

  1. #1
    Registered User xlnk's Avatar
    Join Date
    Mar 2002

    Question CString

    I want to use CString in win32. What header files should I include to use CString?
    the best things in life are simple.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Then you want to learn MFC.
    Or you could just learn string instead.


  3. #3
    Master of the Universe! velius's Avatar
    Join Date
    Sep 2003
    You are suppose to include atlstr.h for non-MFC version of CString. and cstringt.h for MFC version. Then you need to use the member function GetBuffer() to get the pointer to the actual string stored internally or else you get the hex address of the data.
    While you're breakin' down my back n'
    I been rackin' out my brain
    It don't matter how we make it
    'Cause it always ends the same
    You can push it for more mileage
    But your flaps r' wearin' thin
    And I could sleep on it 'til mornin'
    But this nightmare never ends
    Don't forget to call my lawyers
    With ridiculous demands
    An you can take the pity so far
    But it's more than I can stand
    'Cause this couchtrip's gettin' older
    Tell me how long has it been
    'Cause 5 years is forever
    An you haven't grown up yet
    -- You Could Be Mine - Guns N' Roses

  4. #4
    Registered User
    Join Date
    Nov 2001
    Include #windows.h


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inserting a swf file in a windows application
    By face_master in forum Windows Programming
    Replies: 12
    Last Post: 05-03-2009, 11:29 AM
  2. Writing CObjects with Serialization to CArchive
    By ruben_gerad in forum C++ Programming
    Replies: 0
    Last Post: 11-09-2006, 08:25 AM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  4. Help with CString class and operator+ overloading
    By skanxalot in forum C++ Programming
    Replies: 2
    Last Post: 10-07-2003, 10:23 AM
  5. Operater overloading - (const char + CString)
    By auth in forum C++ Programming
    Replies: 14
    Last Post: 10-24-2002, 09:22 AM