Wrox Programmer Forums
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 11th, 2006, 08:33 PM
Registered User
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Where is CString??

I am trying to convert a project from C# to VC++ 2005.
In C# a string is a built in type. I searched through help and internet for 5 hours trying to find which library do i have to include to make the CString class work, no results.
Also is there a way to avoid this situation in the future?
Old April 11th, 2006, 10:19 PM
Registered User
Join Date: Mar 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts


The CString is defined in "afxstr.h", and this is how it is defined in afxstr.h

typedef ATL::CStringT< TCHAR, StrTraitMFC< TCHAR > > CString;

As far as i know you dont need to add any extra librarry for that, this is available in both C# and VC.NET.

Hope that would be the answer of your question.

Thanks & Regards,
Qaisar Aftab Kiani.

Similar Threads
Thread Thread Starter Forum Replies Last Post
convert wchar* to cstring arun.sharma.kumar Visual C++ 8 February 20th, 2007 01:52 AM
Converting from managed String to MFC CString neethling Visual C++ 0 October 28th, 2004 10:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.