C programming with Cocoa

Discussion in 'Mac Programming' started by shipdestroyer, Sep 10, 2008.

  1. macrumors 6502

    Joined:
    Jun 5, 2007
    Messages:
    267
    Location:
    New Hampshire
    #1
    I'm working on an assignment for school that must be written in pure C. The interface, however, can be written in any language. Is it possible to use a Cocoa GUI for a C program?

    Would it be easy to use the C code from within an objective-C file? I'm guessing the objective-C parts would be used for UI events, button clicks, whatever, and those would call the C functions.
     
  2. Moderator

    robbieduncan

    Staff Member

    Joined:
    Jul 24, 2002
    Messages:
    24,480
    Location:
    London
    #2
    Objective-C is a strict superset of C: you can use C freely within Objective-C files.
     

Share This Page