Extending a C program

Discussion in 'C++' started by Pinnerite, Jan 16, 2013.

  1. Pinnerite

    Pinnerite Guest

    There is a 'C' program that I use extensively but it lacks a couple of
    things. One is to tell it to name a file and the other where to put it.
    This needs a GUI drop-down and a dialog box.

    My question is should I look for a C or a C++ library that can provide the
    functionality? Suggestions for libraries would be very welcome.

    --
    ___________________________________________________

    Mageia 2 for x86_64, Kernel: 3.4.13-desktop-1.mga2
    KDE version 4.8.4 Running on an AMD 4-core processor
    Pinnerite, Jan 16, 2013
    #1
    1. Advertising

  2. On 16/01/13 11:28, Pinnerite wrote:
    > There is a 'C' program that I use extensively but it lacks a couple of
    > things. One is to tell it to name a file and the other where to put it.
    > This needs a GUI drop-down and a dialog box.
    >
    > My question is should I look for a C or a C++ library that can provide the
    > functionality? Suggestions for libraries would be very welcome.
    >


    Use whichever you are most comfortable with, although since it is
    already written in C you'll probably find it easier to continue working
    in C.

    C programs often use C++ keywords for variable names which causes issues
    when trying to compile them with a C++ compiler.

    I'd suggest GTK+ for the GUI since it has both C and C++ bindings so you
    can choose which one you want to use. If you decide to use C++ then Qt
    is pretty hard to beat.
    Chicken McNuggets, Jan 16, 2013
    #2
    1. Advertising

  3. Pinnerite

    Pinnerite Guest

    Chicken McNuggets wrote:

    > On 16/01/13 11:28, Pinnerite wrote:
    >> There is a 'C' program that I use extensively but it lacks a couple of
    >> things. One is to tell it to name a file and the other where to put it.
    >> This needs a GUI drop-down and a dialog box.
    >>
    >> My question is should I look for a C or a C++ library that can provide
    >> the
    >> functionality? Suggestions for libraries would be very welcome.
    >>

    >
    > Use whichever you are most comfortable with, although since it is
    > already written in C you'll probably find it easier to continue working
    > in C.
    >
    > C programs often use C++ keywords for variable names which causes issues
    > when trying to compile them with a C++ compiler.
    >
    > I'd suggest GTK+ for the GUI since it has both C and C++ bindings so you
    > can choose which one you want to use. If you decide to use C++ then Qt
    > is pretty hard to beat.


    Thanks, Alan
    --
    ___________________________________________________

    Mageia 2 for x86_64, Kernel: 3.4.13-desktop-1.mga2
    KDE version 4.8.4 Running on an AMD 4-core processor
    Pinnerite, Jan 16, 2013
    #3
  4. Pinnerite

    Jorgen Grahn Guest

    On Wed, 2013-01-16, Pinnerite wrote:
    > There is a 'C' program that I use extensively but it lacks a couple of
    > things. One is to tell it to name a file and the other where to put it.
    > This needs a GUI drop-down and a dialog box.
    >
    > My question is should I look for a C or a C++ library that can provide the
    > functionality? Suggestions for libraries would be very welcome.


    Way too little information. E.g.
    - does it have a GUI already?
    - how does the need to "name a file" translate into a need for
    "a GUI drop-down and a dialog box"? Lots of programs can do it
    without either.
    - how is this presumably existing file named today?

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Jan 16, 2013
    #4
  5. Pinnerite

    Pinnerite Guest

    Jorgen Grahn wrote:

    > On Wed, 2013-01-16, Pinnerite wrote:
    >> There is a 'C' program that I use extensively but it lacks a couple of
    >> things. One is to tell it to name a file and the other where to put it.
    >> This needs a GUI drop-down and a dialog box.
    >>
    >> My question is should I look for a C or a C++ library that can provide
    >> the
    >> functionality? Suggestions for libraries would be very welcome.

    >
    > Way too little information. E.g.
    > - does it have a GUI already?


    No.

    > - how does the need to "name a file" translate into a need for
    > "a GUI drop-down and a dialog box"? Lots of programs can do it
    > without either.


    I want to mimic the way that Windows does it to encourage refugees.

    > - how is this presumably existing file named today?


    Files receive a randomly created name and are placed in a 'hard-wired'
    directory.

    >
    > /Jorgen
    >

    --
    ___________________________________________________

    Mageia 2 for x86_64, Kernel: 3.4.13-desktop-1.mga2
    KDE version 4.8.4 Running on an AMD 4-core processor
    Pinnerite, Jan 17, 2013
    #5
  6. Pinnerite

    Jorgen Grahn Guest

    On Thu, 2013-01-17, Pinnerite wrote:
    > Jorgen Grahn wrote:
    >
    >> On Wed, 2013-01-16, Pinnerite wrote:
    >>> There is a 'C' program that I use extensively but it lacks a couple of
    >>> things. One is to tell it to name a file and the other where to put it.
    >>> This needs a GUI drop-down and a dialog box.
    >>>
    >>> My question is should I look for a C or a C++ library that can provide
    >>> the
    >>> functionality? Suggestions for libraries would be very welcome.

    >>
    >> Way too little information. E.g.
    >> - does it have a GUI already?

    >
    > No.
    >
    >> - how does the need to "name a file" translate into a need for
    >> "a GUI drop-down and a dialog box"? Lots of programs can do it
    >> without either.

    >
    > I want to mimic the way that Windows does it to encourage refugees.


    That can be right in some circumstances, but in others you'll (a)
    create a ghetto for the refugees and (b) offend the natives. It's
    usually IMO better to look at what's normal in the environment you're
    using, whatever it is.

    If it's command-line Unix I'd expect to get the result as text on
    std::cout, and/or be able to provide the filename using an '-o'
    command-line option. See Eric Raymond's book (online).

    Anyway, all this is offtopic, so I should probably stop there.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Jan 17, 2013
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francis Shanahan

    Re: Extending DataGrid

    Francis Shanahan, Aug 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    906
    Francis Shanahan
    Aug 26, 2003
  2. Ken Dopierala Jr.

    Extending page time out length.

    Ken Dopierala Jr., Nov 9, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    404
    Oliver
    Nov 9, 2003
  3. ndario

    extending and editing user control

    ndario, Jan 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    317
    ndario
    Jan 30, 2004
  4. =?Utf-8?B?cG9wc292eUBydXNtZXguY29t?=

    Code Reusability -- Extending web Application

    =?Utf-8?B?cG9wc292eUBydXNtZXguY29t?=, Jan 31, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    429
    Kevin Spencer
    Feb 2, 2004
  5. Anthony Williams
    Replies:
    8
    Views:
    562
    Anthony Williams
    Feb 24, 2004
Loading...

Share This Page