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 Could I Use a define macro identifier in an other define macro replacement list?

How Could I Use a define macro identifier in an other define macro replacement list?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
6 Posts 5 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.
  • A Offline
    A Offline
    A Ms
    wrote on last edited by
    #1

    How Could I Use a define macro identifier in an other define macro replacement list? for example in the following example:

    #define APP_TEST1 L"Test1"
    #define APP_TEST2 L"Test2"

    #define APP_TEST L"Test1 With Test2"

    I want to represent the third define macro with 2 first macro?

    _ K 2 Replies Last reply
    0
    • A A Ms

      How Could I Use a define macro identifier in an other define macro replacement list? for example in the following example:

      #define APP_TEST1 L"Test1"
      #define APP_TEST2 L"Test2"

      #define APP_TEST L"Test1 With Test2"

      I want to represent the third define macro with 2 first macro?

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      #define APP_TEST APP_TEST1 " With " APP_TEST2

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      A 1 Reply Last reply
      0
      • _ _Superman_

        #define APP_TEST APP_TEST1 " With " APP_TEST2

        «_Superman_» I love work. It gives me something to do between weekends.
        Microsoft MVP (Visual C++)

        A Offline
        A Offline
        A Ms
        wrote on last edited by
        #3

        Thanks, It works

        1 Reply Last reply
        0
        • A A Ms

          How Could I Use a define macro identifier in an other define macro replacement list? for example in the following example:

          #define APP_TEST1 L"Test1"
          #define APP_TEST2 L"Test2"

          #define APP_TEST L"Test1 With Test2"

          I want to represent the third define macro with 2 first macro?

          K Offline
          K Offline
          KarstenK
          wrote on last edited by
          #4

          be really careful with macros, because it is hard to debug and in can lead to really bogouis errors. => //const LPTCSTR APP_TEST1 = L"Test1"; const LPCTSTR APP_TEST1 = L"Test1"; ... Code quality is also an important issue :-O

          Press F1 for help or google it. Greetings from Germany

          modified on Friday, March 19, 2010 3:30 AM

          N 1 Reply Last reply
          0
          • K KarstenK

            be really careful with macros, because it is hard to debug and in can lead to really bogouis errors. => //const LPTCSTR APP_TEST1 = L"Test1"; const LPCTSTR APP_TEST1 = L"Test1"; ... Code quality is also an important issue :-O

            Press F1 for help or google it. Greetings from Germany

            modified on Friday, March 19, 2010 3:30 AM

            N Offline
            N Offline
            Nuri Ismail
            wrote on last edited by
            #5

            KarstenK wrote:

            const LPTCSTR APP_TEST1 = L"Test1";

            It should be LPCTSTR. :)

            K 1 Reply Last reply
            0
            • N Nuri Ismail

              KarstenK wrote:

              const LPTCSTR APP_TEST1 = L"Test1";

              It should be LPCTSTR. :)

              K Offline
              K Offline
              KingsGambit
              wrote on last edited by
              #6

              Good catch :)

              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