1. 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.

CString to string

Discussion in 'Software Development' started by calculus87, Sep 25, 2003.

Thread Status:
Not open for further replies.
  1. calculus87

    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?)
     
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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/167369

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice