Modifying a CString

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jj555s
    New Member
    • Mar 2007
    • 36

    Modifying a CString

    I've tried a couple of methods and I can't get it to work. I'm trying to change the extension of a file.

    CString targetfile = "dhgdgjf.tx t";
    LPTSTR p = targetfile.GetB uffer();
    targetfile.Find (".txt");
    lstrcpy( p, _T(".doc") );
    targetfile.Rele aseBuffer();
  • jj555s
    New Member
    • Mar 2007
    • 36

    #2
    bump bump bump

    Comment

    • sicarie
      Recognized Expert Specialist
      • Nov 2006
      • 4677

      #3
      I'm not sure you want to just "change" the file extension like that - it might make the file unreadable. Are you just trying to change the filetype? What is the overall goal you're trying to accomplish?

      Comment

      Working...