Black Horse programmer 01-first OC Program

Source: Internet
Author: User

--- Java training, Android training, IOS training, and. Net training. We look forward to communicating with you! ---

1. Code Writing

Like the C language, the entry of the OC program is the main function, but it is written in the source file (. M file) of the OC.

For example, in the first OC main. M file (the file name can be Chinese ):

1 # include <stdio. h> 2 // OC program entry: Main Function 3 // OC program fully compatible with C language 4 int main (INT argc, const char * argv []) 5 {6 printf ("1st OC Programs \ n"); 7 return 0; 8}

2. Terminal commands

  1. Compile CC-C main. m
  2. Link CC main. o
  3. Run./A. Out

This section focuses on

  1. OC program entry: Main Function
  2. Terminal commands
    • Compile CC-C main. m
    • Link CC main. o
    • Run./A. Out

 

 

Black Horse programmer 01-first OC Program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.