How to convert C program to Objective C?

Discussion in 'iPhone/iPad Programming' started by armyguy26, Jul 2, 2010.

  1. macrumors member

    #1
    Hi Everybody,
    How would you convert a C program to an Objective C program? Thanks.
     
  2. Moderator

    dejo

    Staff Member

    #2
    Objective-C is a superset of C. So, depending on what your code does, you may not need to do much conversion.
     
  3. macrumors member

    #3

    What type of conversions would you need to make?
     
  4. Moderator

    dejo

    Staff Member

    #4
    Wirelessly posted (Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_3 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7E18 Safari/528.16)

    What does the program do?
     
  5. macrumors 603

    #5
    Step 1: rename *.c files to *.m
    Step 2: ?
    Step 3: profit?
     
  6. macrumors member

    #6

    One is a blackjack one and another one is a ask the nerd program.
     
  7. Moderator

    dejo

    Staff Member

    #7
    What kind of UI does these programs have? Command-line input or what?
     
  8. macrumors member

    #8
    Command-line input
     
  9. Moderator

    dejo

    Staff Member

    #9
    Well, that part will need to be converted.
     
  10. macrumors member

    #10
    So how do I convert it?
     
  11. Moderator emeritus

    kainjow

    #11
    You can't do CLI apps on the iPhone. You'd need to use UIKit and write a GUI.
     
  12. macrumors member

    #12
    ok
     

Share This Page