Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Migration to VC.NET

Migration to VC.NET

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++xmlquestion
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vikramj
    wrote on last edited by
    #1

    hi friends, My question is related to VC.NET. I am working on VC++ on my application since last 1 yr. Now we are migrating to VC.NET. In the process, i am getting 100 errors related to T2A macro. the macro converts to W2A under unicode build. the error is "error C2664: 'T2A' : cannot convert parameter 1 from 'CString' to 'LPTSTR'". the same line of code was working well/ works well in VC 6 env. the code is xmlSetProp(relListNode, SAFE_CAST("rid"), SAFE_CAST (T2A(relID))); Please ignore the XML related stuff. The area of problem is T2A(CString). If anyone knows any solution, please help. ;) Thnaks and regards. Vikram

    J 1 Reply Last reply
    0
    • V vikramj

      hi friends, My question is related to VC.NET. I am working on VC++ on my application since last 1 yr. Now we are migrating to VC.NET. In the process, i am getting 100 errors related to T2A macro. the macro converts to W2A under unicode build. the error is "error C2664: 'T2A' : cannot convert parameter 1 from 'CString' to 'LPTSTR'". the same line of code was working well/ works well in VC 6 env. the code is xmlSetProp(relListNode, SAFE_CAST("rid"), SAFE_CAST (T2A(relID))); Please ignore the XML related stuff. The area of problem is T2A(CString). If anyone knows any solution, please help. ;) Thnaks and regards. Vikram

      J Offline
      J Offline
      Joe Woodbury
      wrote on last edited by
      #2

      There is no conversion for CString to a non-const string. Reading the help, it looks like you need to use the T2CA macro.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups