How to manage variable and function names

This is a discussion on How to manage variable and function names within the C++ Programming forums, part of the General Programming Boards category; Hi, I've written some codes (actually quite a lot, around 30 files) ... in Linux ... but i would like ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    5

    How to manage variable and function names

    Hi,
    I've written some codes (actually quite a lot, around 30 files) ... in Linux ... but i would like to change names of my Classes, Variable Names and Functions, any way to change it quickly and safe?
    Any tools allow me to manage that?
    Thanks
    Jeff

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Eclipse is an IDE that has this feature, and as far as I know, it's free too.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,794
    You're basically talking about a refactoring tool. A search of the Web brings up this list of refactoring tools. The good part is that it lists 3 for C++. The bad part is that it only lists 3 for C++.

    Eclipse is an IDE that has this feature, and as far as I know, it's free too.
    Now, if only those guys over at Netbeans ported over their refactoring functionality for their C/C++ plugin...
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    230
    I think Turbo C++ had that feature. Though I'm not sure if you should depend on it for anything else (the editor is not bad, but I'm not sure about the compiler).

    EDIT: sorry, forgot you wanted a utility for Linux. I think Turbo C++ is for Windows only.
    Last edited by Abda92; 01-26-2008 at 11:42 AM.

  5. #5
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,663
    The compiler is worse than the editor (by far)
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Abda92 View Post
    EDIT: sorry, forgot you wanted a utility for Linux. I think Turbo C++ is for Windows only.
    Technically for DOS mainly, but certainly not Linux.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    By the way, Emacs has some pretty good search/replace facilities - and as long as you rename one thing at a time, you can check with the compiler that you got it right...

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,794
    That refactoring tool list I linked to lists Xrefactory, an emacs plugin, as one of the tools for C++.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Registered User
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    5
    Thanks, Witch,
    This is a great help ...

  10. #10
    Registered User
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    5
    the Eclipse is easier to learn, Xrefactory is a bit complicated for me ...
    Eclipse C++ IDE is perfect

  11. #11
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,663
    Perfect? I doubt that. Nothing is perfect, and Eclipse even less so than other, specialized, IDEs I would think.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Registered User
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    5
    Haha, Elysia took it quite seriously ... i should have said "perfect for my needs, my skills, and my time " ...

  13. #13
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,663
    Last time I tried to use Eclipse, it was an extreme pain to set up. So I can't quite call it perfect. Though it wasn't for C++, I would image it's still the same.
    And I don't think there's a compiler either? So that means manual compiling? Fun...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    http://wascana.sourceforge.net/

    Download, install, enter your code, press build.

  15. #15
    Registered User
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    5
    Really, i didn't have difficulty. Download, install, new project, add file system, Right click, refactor .. that's it ... :|

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21