Thread: copy string to header file

  1. #1
    Registered User
    Join Date
    Jul 2009

    copy string to header file

    hi all,

    i need to write some information from xml file to some part of definition of header file

    so i read strings from xml (e.g. so i have string s ) and i need to copy those strings to some string in something.h

    is this possible?

    thank you


  2. #2
    Registered User
    Join Date
    Oct 2008
    Erm... wanting that makes no sense at all. So you should really state what you want in stead of a bad solution on how you want it.

    Of course you can put a variable in a header file which you change in one source file and read (or change again) in another source file...

  3. #3
    Registered User Cooloorful's Avatar
    Join Date
    Feb 2009
    There are libraries that others have painstakingly perfected for this task, if that is of help. I am not trying to skirt helping you, but you are not wanting to implement a trivial feature in your program. You just have to do some grunt work and write a parser, if you want to do it by hand.

    I recommend using iostreams for your parsing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  2. Replies: 4
    Last Post: 03-03-2006, 02:11 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM