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. How do i use a CString in a non-MFC app?

How do i use a CString in a non-MFC app?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
7 Posts 5 Posters 0 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.
  • R Offline
    R Offline
    redeemer
    wrote on last edited by
    #1

    What do i include? WHen i try to declare a CString it says undeclared identifier. Thanks.

    R J R 3 Replies Last reply
    0
    • R redeemer

      What do i include? WHen i try to declare a CString it says undeclared identifier. Thanks.

      R Offline
      R Offline
      Rage
      wrote on last edited by
      #2

      #include

      ~RaGE();

      R 1 Reply Last reply
      0
      • R redeemer

        What do i include? WHen i try to declare a CString it says undeclared identifier. Thanks.

        J Offline
        J Offline
        John M Drescher
        wrote on last edited by
        #3

        Unless you are using WTL you can't, because the MFC version of CString requires some MFC Internals. There is a WTL version but this requires you to use ATL and WTL. John

        1 Reply Last reply
        0
        • R Rage

          #include

          ~RaGE();

          R Offline
          R Offline
          redeemer
          wrote on last edited by
          #4

          k

          1 Reply Last reply
          0
          • R redeemer

            What do i include? WHen i try to declare a CString it says undeclared identifier. Thanks.

            R Offline
            R Offline
            Ramon Casellas
            wrote on last edited by
            #5

            VC NET Use ATL::CString #include <atlstr.h> In VC 6, you can use WTL::CString if you download WTL, but the class in WTL 3.1 was not incredibly good. Regards, R.

            R 1 Reply Last reply
            0
            • R Ramon Casellas

              VC NET Use ATL::CString #include <atlstr.h> In VC 6, you can use WTL::CString if you download WTL, but the class in WTL 3.1 was not incredibly good. Regards, R.

              R Offline
              R Offline
              Rage
              wrote on last edited by
              #6

              Sorry, seems that the rest of my post got lost :( ... OK, Ramon gave you the right thing ... ~RaGE();

              L 1 Reply Last reply
              0
              • R Rage

                Sorry, seems that the rest of my post got lost :( ... OK, Ramon gave you the right thing ... ~RaGE();

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Why not use stl string. its much better than the CString and feature rich. Easy o use. If u r unsure why not peek into "Thinking in C++" by Bruce Eckel Vol 2. @ mindview.net:-O

                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