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 to initialize a CString array in MSVS C++ 2015

How to initialize a CString array in MSVS C++ 2015

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structurestutorialquestion
5 Posts 4 Posters 3 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.
  • M Offline
    M Offline
    Member 9411471
    wrote on last edited by
    #1

    how do you initialize this CString array in msvc mfc 2015? CString weekday[] = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"}; It worked from msvc++ 2010 but does not work for 2015. Thanx in Advance

    J C 2 Replies Last reply
    0
    • M Member 9411471

      how do you initialize this CString array in msvc mfc 2015? CString weekday[] = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"}; It worked from msvc++ 2010 but does not work for 2015. Thanx in Advance

      J Offline
      J Offline
      jeron1
      wrote on last edited by
      #2

      By not working, do you mean it doesn't compile, doesn't show the values you thought, or someting other?

      M 1 Reply Last reply
      0
      • M Member 9411471

        how do you initialize this CString array in msvc mfc 2015? CString weekday[] = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"}; It worked from msvc++ 2010 but does not work for 2015. Thanx in Advance

        C Offline
        C Offline
        Chris Losinger
        wrote on last edited by
        #3

        CString weekday[] = {CString ("Sun"), CString( "Mon")...};

        image processing toolkits | batch image processing

        1 Reply Last reply
        0
        • J jeron1

          By not working, do you mean it doesn't compile, doesn't show the values you thought, or someting other?

          M Offline
          M Offline
          Member 9411471
          wrote on last edited by
          #4

          It will not compile using msvc++ 2015

          V 1 Reply Last reply
          0
          • M Member 9411471

            It will not compile using msvc++ 2015

            V Offline
            V Offline
            Victor Nijegorodov
            wrote on last edited by
            #5

            Member 9411471 wrote:

            It will not compile using msvc++ 2015

            And what compiler error does it produce?

            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