Thread: removing < > from headers

  1. #1
    Registered User
    Join Date
    Jun 2015
    Posts
    6

    removing < > from headers

    Hi,

    I need remove the < and > part of header includes and replace with " and "

    eg- #include <tchar.h> to #include "tchar.h"

    There are so many files. can anybody give me idea how i can do this?

    thanks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    A text editor/IDE might be able to perform a global search and replace using regular expressions. Alternatively, perhaps a shell script could be written to do the job.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2015
    Posts
    184
    I think notepad++ can do this. Not really a c++ question through.

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Don't do this.
    Header includes that have <> instead of "" tell the compiler to look first in the locations where system header files are.
    You should leave the code alone.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  5. #5
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by iMalc View Post
    Header includes that have <> instead of "" tell the compiler to look first in the locations where system header files are.
    If I remember correctly "not first"

    <> looks in include folders only
    "" looks in current folder first, next in include folders
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  6. #6
    Registered User
    Join Date
    Mar 2015
    Posts
    184
    Yes useful if someone made their own customized versionsof standard headers. Good to keep those out of the standard search paths.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Modifying system headers, or even making copies of them and modifying them and using those instead of the regular system headers is not recommended in the first place.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 03-07-2014, 09:36 PM
  2. exe headers
    By punkywow in forum C++ Programming
    Replies: 8
    Last Post: 09-30-2009, 03:42 AM
  3. headers
    By crvenkapa in forum Tech Board
    Replies: 1
    Last Post: 06-16-2007, 10:31 AM
  4. Headers
    By Abbara in forum C++ Programming
    Replies: 2
    Last Post: 10-17-2005, 11:56 AM
  5. including headers inside headers
    By kromozom in forum C++ Programming
    Replies: 5
    Last Post: 04-18-2005, 10:56 AM