How to convert C program to Objective C?

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

  1. macrumors member

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


    Staff Member

    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


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


    Staff Member

    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

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


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


    Staff Member

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

    Command-line input
  9. Moderator


    Staff Member

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

    So how do I convert it?
  11. Moderator emeritus


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


Share This Page