CString to string

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

calculus87

Thread Starter
Joined
Sep 4, 2003
Messages
34
Hello,
here is my question. I am new to VC++, but not C++.
I would like to pass a variable of type CString (VC++) to a string in (C++).
I currently am saving the variable of type CString in a file. Then in my C++ code open the file and read it out as type string.
Is there just some short conversion.

CString s1;
s1="hello";
string s2;
s2=s1;

could you do this? If not then what?

Thanks for the help,
Ronald

(oh, by the way, how do you put your pic in the site?)
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top