If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > CString to string

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-25-03, 13:12
calculus87 calculus87 is offline
Registered User
 
Join Date: Sep 2003
Posts: 23
CString to string

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?)
__________________
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.
Reply With Quote
  #2 (permalink)  
Old 10-06-03, 10:28
Marvels Marvels is offline
Registered User
 
Join Date: Jul 2003
Location: Amsterdam, Nederland
Posts: 449
Yas you can but.....

CString s1;

CString s2;

s1="hello";
string s2;
s2=s1;
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On