copy string to header file

This is a discussion on copy string to header file within the C++ Programming forums, part of the General Programming Boards category; hi all, i need to write some information from xml file to some part of definition of header file so ...

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    2

    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

    Martin

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    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
    Posts
    59
    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, 04: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, 07:39 AM
  4. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 05:10 PM

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