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 replace a variable everywhere in a big project ?

How to replace a variable everywhere in a big project ?

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiontutorial
6 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi, I'm using Visual C++ 6 and I have a big project (around 1000 c, cpp, h). How can I modify a variable everywhere in the project ? The "replace" function does work only for a file !! And it would take me ages to do it everywhere without forgetting any !! Thanks !!!!!

    K G D P 4 Replies Last reply
    0
    • L Lost User

      Hi, I'm using Visual C++ 6 and I have a big project (around 1000 c, cpp, h). How can I modify a variable everywhere in the project ? The "replace" function does work only for a file !! And it would take me ages to do it everywhere without forgetting any !! Thanks !!!!!

      K Offline
      K Offline
      Kene
      wrote on last edited by
      #2

      VStudio.Net (i.e ver 7.0) comes with this feature. It's called replace in files. And can be found on the edit menu. What would life be without programmers and salesmen?

      L 1 Reply Last reply
      0
      • K Kene

        VStudio.Net (i.e ver 7.0) comes with this feature. It's called replace in files. And can be found on the edit menu. What would life be without programmers and salesmen?

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

        Thanks, but what does exist under VC6 ?

        1 Reply Last reply
        0
        • L Lost User

          Hi, I'm using Visual C++ 6 and I have a big project (around 1000 c, cpp, h). How can I modify a variable everywhere in the project ? The "replace" function does work only for a file !! And it would take me ages to do it everywhere without forgetting any !! Thanks !!!!!

          G Offline
          G Offline
          G Raven
          wrote on last edited by
          #4

          Try one of the shareware simple text editors that support that feature, like EditPlus. Be careful as that is a dangerous operation. For example, make sure you don't have any other vars whose name contain the text you're changing. G. Raven

          1 Reply Last reply
          0
          • L Lost User

            Hi, I'm using Visual C++ 6 and I have a big project (around 1000 c, cpp, h). How can I modify a variable everywhere in the project ? The "replace" function does work only for a file !! And it would take me ages to do it everywhere without forgetting any !! Thanks !!!!!

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Pierre_1 wrote: And it would take me ages to do it everywhere without forgetting any !! If it's one variable that's used globally, just change the declaration of it and the compiler will tell you of the references. Yes this still takes time, but you wouldn't forget any. Otherwise, what you want is not possible with the v6 IDE.


            A rich person is not the one who has the most, but the one that needs the least.

            1 Reply Last reply
            0
            • L Lost User

              Hi, I'm using Visual C++ 6 and I have a big project (around 1000 c, cpp, h). How can I modify a variable everywhere in the project ? The "replace" function does work only for a file !! And it would take me ages to do it everywhere without forgetting any !! Thanks !!!!!

              P Offline
              P Offline
              Prakash Nadar
              wrote on last edited by
              #6

              I am totally against changing the name of a variable in 1000 c,c++ files, totally ineffcient thing to do. May be you are converting the source codes for some coding standards. but the job is inefficient. I Touched Osama Bin Ladens Bushy Beard

              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