'wrapping' code

This is a discussion on 'wrapping' code within the C++ Programming forums, part of the General Programming Boards category; what is meant exactly by the term wrapping code? -that is in the context of intergrating code from another language? ...

  1. #1
    gull
    Guest

    'wrapping' code

    what is meant exactly by the term wrapping code?
    -that is in the context of intergrating code from another language?

    let me explain my problem:

    i am building a system in C++ in a modular fashion (as should be).
    To this end i need to integrate the (entire) functionality of a small but related set of programs written in C. Each console executable uses the same header files & these contain a lot of globals which i want to keep away from the rest of my system. Each program in effect takes command line parameters, a couple of files, and outputs numerical results to std out.

    Ideally, i would like to wrap these programs into a class, and rename each main() in each program as a separate function. This would save me writing code to make a system call to run each executable...

    ...but the header files:

    what options do i have? is the above possible? what are the most common approaches to this problem? i'm a complete newbie with this stuff, so any pointers of comments of any kind would be well received.
    I'm on a tight deadline too, so what's the quicj=kest thing i can do here?

    thanks

    g

  2. #2
    gull
    Guest

    Question help! -that was a question b.t.w.

    .

  3. #3
    gull
    Guest

    Smile ~me again!

    Don't worry people, i've just worked out a way to do it and it doesn't even require so much as an extern "c"....

    ...ah the beauty of the ANSI C & C++ standards!...

    whatever did people do before standardization?
    i guess i'll never know

  4. #4
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >whatever did people do before standardization?

    Perhaps create their own variant of C so it fits their needs and so that someone else his/her compiler cannot compile it.

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >whatever did people do before standardization?
    They ran around all willy nilly. Think of all the flavors of BASIC that are around, that was what it was like, except with a better language.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Enforcing Machine Code Restrictions?
    By SMurf in forum Tech Board
    Replies: 21
    Last Post: 03-30-2009, 07:34 AM
  2. Using wrapping code icon doesn't work?
    By Aia in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 02-03-2008, 05:15 AM
  3. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 05:05 PM

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