Jump to content

starting to learn Objective C programing to make IOS Apps!


peter123456

Recommended Posts

I am starting to learn it and so far i'm liking it a lot but im just starting in it learning the basics of C first with the book i got for objective c. its very neat to me so far I am learning about functions and arguments.

 

 

This is just one of the exercise I did today I for functions and thought its pretty sweet.

 

 

Super repetitive


int main (int argc, const char * argv[])
{
printf("Mark has done as much Cocoa Programming as I could fit into 5 days\n");
printf("Bo has done as much Objective-C Programming as I could fit into 2 days\n");
printf("Mike has done as much Python Programming as I could fit into 5 days\n");
printf("Ted has done as much iOS Programming as I could fit into 5 days\n");
return 0;
}

Solution is to print out the repeating words and the declare each student as a char and the programing language as a char as well and then the number of days the class was as an int

 


void congratulateStudent(char *student, char *course, int numDays)
{
printf("%s has done as much %s Programming as I could fit into %d days.\n",
student, course, numDays);
}


int main (int argc, const char * argv[])
{
congratulateStudent("Mark", "Cocoa", 5);
congratulateStudent("Bo", "Objective-C", 2);
congratulateStudent("Mike", "Python", 5);
congratulateStudent("Ted", "iOS", 5);
return 0;
}

 

BTW How much is objective c and c in relation to java?

 

 

 

 

Link to comment
Share on other sites

I'm leaning Objective C at school, and I can say that you can't compare Java to Objective C. They use the same logic, but Objective C is in my opinion so damn WEIRD.

 

I've never understood Apple's desire to use Objective-C. Object oriented programming for core operating system functions is generally frowned upon. For the less essential parts of the operating system, wouldn't it make more sense to use C++, the faster and natively compatible version of Objective-C?

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...