There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers error excel external hard drive firefox freezes freezing hard drive hardware hijackthis internet internet explorer itunes laptop mac malware motherboard mouse network networking outlook 2007 power printer problem ram router screen slow sound trojan usb virus vista vista 32-bit windows windows vista windows xp winxp wireless wmp
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Conversion of CString to string VC++/C++


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
calculus87's Avatar
Member with 34 posts.
 
Join Date: Sep 2003
01-Oct-2003, 05:09 PM #1
Conversion of CString to string VC++/C++
Hello,
Here is my question. I have a program which has a VC++ frontend. While the VC++ program is running it calls a C++ program in the background. The C++ program returns a string. Now I need to save that string. But the only way I know how(which does not work) is through CString. So my question is this, is there any way so save the returned string? Thanks for taking a look.
Sincerely,
Ronald
__________________
This message is a natural product made from recycled electrons. The slight
variations in spelling and grammar enhance its individual character and
beauty and in no way are to be considered flaws or defects.
Anne Troy's Avatar
Computer Specs
Administrator with 11,484 posts.
 
Join Date: Feb 1999
Location: Allentown, PA
Experience: Microsoft Word MVP
01-Oct-2003, 06:48 PM #2
Hi, Calc. I moved your Q to Development, which is where most programming answers can be gotten.

calculus87's Avatar
Member with 34 posts.
 
Join Date: Sep 2003
02-Oct-2003, 10:50 AM #3
Okay,
I did not realize that. Thanks a bunck.
~Ronald
Guy's Avatar
Guy Guy is offline
Senior Member with 260 posts.
 
Join Date: Feb 1999
Location: abby, BC, canada
03-Oct-2003, 05:05 PM #4
Did you want a conversion from CString to string? or string to CString?

here is string to CString:
Code:
string s = "hello string";
CString c = s.c_str();
here is CString to string:
Code:
CString c = "hello CString";
string s = c;
calculus87's Avatar
Member with 34 posts.
 
Join Date: Sep 2003
03-Oct-2003, 05:16 PM #5
ahhh, thanks a bunch. Works very nicely
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:01 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.